- 1

What is the sum of numbers printed by this code? (Kindly explain the answer)

for i in range(10): try: if 10 / i == 2.0: break except ZeroDivisionError: print(1) else: print(2)

1st Apr 2020, 4:50 AM
Sinjini Ghosh
Sinjini Ghosh - avatar
11 Answers
+ 2
It's sum of all printing numbers. The printing values are 1,2,2,2,2 = 9
4th Jun 2020, 11:14 AM
Dhinesh
Dhinesh - avatar
+ 2
La respuesta es : 4
27th Jun 2020, 5:49 PM
America Hernandez
America Hernandez - avatar
+ 2
What is sum of the numbers printed by this code? for i in range(10): try: if 10 / i == 2.0: break except ZeroDivisionError: print(1) else: print(2) Answer :- 9
29th Jun 2020, 7:15 AM
Gourav Tomar
Gourav Tomar - avatar
0
Try this on sololearn code playground and analyze the output.
1st Apr 2020, 4:52 AM
Maninder $ingh
Maninder $ingh - avatar
0
9
5th Nov 2020, 3:33 PM
dammika rajapaksha
dammika rajapaksha - avatar
0
for i in range(10): try: if 10 / i == 2.0: break except ZeroDivisionError: print(1) else: print(2) ans is : 9 follow me for more answer
11th May 2021, 9:58 AM
CHANCHAPARA JAY G.
CHANCHAPARA  JAY G. - avatar
0
9
28th May 2021, 8:03 PM
SARIKA SODHI
SARIKA SODHI - avatar
0
9
20th Dec 2021, 5:00 PM
Ayyoub Chikhi
0
answer is 9
16th Aug 2022, 6:42 AM
Iman Jafari
Iman Jafari - avatar
- 1
4
5th Nov 2020, 3:23 PM
dammika rajapaksha
dammika rajapaksha - avatar
- 1
What is sum of the numbers printed by this code? for i in range(10): try: if 10 / i == 2.0: break except ZeroDivisionError: print(1) else: print(2) A. 9
21st Jan 2021, 7:06 PM
Syed Fahad Ahmed
Syed Fahad Ahmed - avatar