+3 votes
in Class 12 by kratos

Find the output of the following Python program:

def makenew(mystr):

newstr = " "

count = 0

for i in mystr:

if count%2 !=0:

newstr = newstr+str(count)

else:

if islower(i):

newstr = newstr+upper(i)

else:

newstr = newstr+i

count +=1

newstr = newstr+mystr[:1]

print "The new string is :",newstr

makenew(“sTUdeNT")

1 Answer

+6 votes
by kratos
 
Best answer

The new string is: S1U3E5Ts

...