0
Do u know this? Which no. Is not printed by this code? I'm getting error.
try: print(1) print(20/0) print(2) except ZeroDivisonError: print(3) finally: print(4)
11 odpowiedzi
+ 6
ZeroDivisionError, not ZeroDivisonError. You're trying to catch an exception that doesn't exist, effectively raising another exception
+ 2
In "finally", it just says "print" with no brackets and string.
+ 2
NUKE Yeah. Also, you spelt ZeroDivisionError wrong?
+ 2
2
+ 1
print(20/0) will raise an exception called ZeroDivisionError. You're trying to catch an exception with the name "ZeroDivisonError". The third "i" in "division" is missing.
Trying to catch an exception that doesn't exist will raise another exception.
+ 1
2 is answer
+ 1
2
0
Anna i didn't get it! Please explain!
0
Mahv sorry it was print(4)
0
2
- 1
Ohhh spelling mistake,silly me.
thanks Anna