+1 vote
in Class 12 by kratos

Observe the following Python code carefully and obtain the output, which will appear on the screen after ***** of it.

def Findoutput ():

L = "earn"

X = " "

count = 1

for i in L:

if i in ['a', 'e',' i', 'o', 'u']:

x = x + 1. Swapcase ()

else:

if (count % 2 ! = 0):

x = x + str(len (L[:count]))

else:

x = x + 1

count = count + 1

print x

Findoutput ()

1 Answer

+6 votes
by kratos
 
Best answer

The output is:

earn

...