Write the output of the following program:
Str = "Computer Science"
index = 0
while index < len(Str):
if Str[index] in "aeiouAEIOU":
print(Str[index].upper(), end=" ")
elif index % 2 == 0:
print(Str[index].lower(), end=" ")
else:
print(Str[index], end="")
print("#", end=" ")
index += 1
Answer:
Answer by student
The output of the program is:
c O m p# U t# E r# S# c I E n# c E
Detailed answer by teachoo
The rest of the post is locked. Join Teachoo Black to see the full post.