A

Admin • 802.91K Points
Coach

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)
  • (A) gun?ow9w
  • (B) gun?ow9w9
  • (C) gun??w9w9
  • (D) gun?ow9w?
  • Correct Answer - Option(B)
  • Views: 5
  • Filed under category Python
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.