Advertisements
Advertisements
Question
Predict the output of the Python code given below:
Text1="IND-23"
Text2=""
I=0
While I<len (Text1):
if Text1[I]>="0" and Text1 [I]<="9":
Val = int (Text1 [I])
Val = Val + 1
Text2=Text2 + str(Val)
elif Text1 [I]>="A" and Text 1 [I]<="Z":
Text2=Text2 + (Text1 [I + 1])
else:
Text2=Text2 + "*"
I+=1
print (Text2)One Word/Term Answer
Advertisements
Solution
ND-*34shaalaa.com
Is there an error in this question or solution?
