A
Q. Write the output of the following
Code:
st1="Flow91"
st2="gun"
I=0
while I<len(st1):
if st1[I]>="a" and st1[I]<="z":
st2=st2+st1[I+1]
elif st1[I]>="0" and st1[I]<="9":
st2=st2+st1[I-1]
else:
st2=st2+"?"
I=I+1
print(st2)
st2="gun"
I=0
while I<len(st1):
if st1[I]>="a" and st1[I]<="z":
st2=st2+st1[I+1]
elif st1[I]>="0" and st1[I]<="9":
st2=st2+st1[I-1]
else:
st2=st2+"?"
I=I+1
print(st2)
- Correct Answer - Option(B)
- Views: 5
- Filed under category Python
- Hashtags:
Discusssion
Login to discuss.