Home / Programming MCQs / Python MCQs / Question

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. What will be the output of the following code snippet?

Code:
word = "Python Programming"
n = len(word)
word1 = word.upper()
word2 = word.lower()
converted_word = ""
for i in range(n):
 if i % 2 == 0:
   converted_word += word2[i]
 else:
   converted_word += word1[i]
print(converted_word)
(A) pYtHoN PrOgRaMmInG
(B) Python Programming
(C) python programming
(D) PYTHON PROGRAMMING

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.