Computer Science, asked by akumar73472, 4 months ago

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 nkmahajapura
2

Answer:

The new string is

Explanation:

S1U3E5Ts

Answered by nvats1007
0

Answer:

Output:  S1U3E5TS

Explanation:

1. it undergoes the loop seven times, therefore the output cannot be just one value.

Similar questions