8. What will be the output of the following code:
def JumbleUp(mystr):
L = len(mystr)
str2='' “
str3='' “
for i in range(0,L,2):
str2=str2 + mystr[i+1]+mystr[i]
for ch in str2: if ch>='R' and ch<='U': str3+='$'
else:
str3+=ch.lower()
return str3
mystr="HARMONIOUS"
mystr=JumbleUp(mystr)
print(mystr)
Answers
Answered by
4
Answer:
py. script
Explanation:
def JumbleUp(mystr):
L = len(mystr)
str2='' “
str3='' “
for i in range(0,L,2):
str2=str2 + mystr[i+1]+mystr[i]
for ch in str2: if ch>='R' and ch<='U': str3+='$'
else:
str3+=ch.lower()
return str3
mystr="HARMONIOUS"
mystr=JumbleUp(mystr)
print(mystr)
Answered by
11
Answer:
Explanation:
def JumbleUp(mystr):
L = len(mystr)
str2='' “
str3='' “
for i in range(0,L,2):
str2=str2 + mystr[i+1]+mystr[i]
for ch in str2: if ch>='R' and ch<='U': str3+='$'
else:
str3+=ch.lower()
return str3
mystr="HARMONIOUS"
mystr=JumbleUp(mystr)
print(mystr)
Similar questions