Computer Science, asked by priyanithish1005, 5 months ago

2. Observe the following code and predict the output:
S="python string fun"
while True:
if s[0]=='p'
S=S(3:]
elif s(-1)=='n'
s=s[:2]
else:
break
print(s)​

Answers

Answered by Anonymous
0

Answer:

in third line it's a error

Explanation:

in third line it's a error

you should write like this if s[0]=='p':

but you have written like this if s[0]=='p'

you have mised ":" which should be given in a if statement

Similar questions