A

Akash Lawaniya • 9.58K 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
  • Correct Answer - Option(A)
  • Views: 655
  • Filed under category Python

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.

Be the first to start discuss.


Question analytics