Please Explain the output with answer(python)
def makenew(mystr):
newstr=""
count=0
for i in mystr:
if count%2!=0:
newstr=newstr+str(count)
else:
if i.islower():
newstr=newstr +i.upper()
else:
newstr=newstr+i
count+=1
newstr=newstr+mystr[:1]
print("The new str is:" , newstr)
makenew("sTUdeNT")
Answers
Answered by
2
Answer:
The new string is
Explanation:
S1U3E5Ts
Answered by
0
Answer:
Output: S1U3E5TS
Explanation:
1. it undergoes the loop seven times, therefore the output cannot be just one value.
Similar questions