Observe the following Python code carefully and obtain the output, which will appear on the screen after execution 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 ()

9 views

1 Answers

The output is:

earn

9 views