πŸ“Š Python
Q. What will be the output of the following Python program?
Code:
i = 0
while i < 5:
    print(i)
    i += 1
    if i == 3:
        break
else:
    print(0)
  • (A) error
  • (B) 0 1 2 0
  • (C) 0 1 2
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) 0 1 2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
205
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
80%
Success Rate