+ 1

Python 3.6.0 is not recognising ZeroDivisonError in exception handling . What should I do ?

except ZeroDivisonError: print("Division By Zero") shows an error that name ' ZeroDivisonError ' is not defined ...

2nd Jun 2017, 12:28 PM
sam agrawal
sam agrawal - avatar
6 Answers
+ 10
You have a typo there: the proper exception catch name is ZeroDivisionError
2nd Jun 2017, 1:04 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 8
You typed ZeroDivisonError - you are missing an 'i' in the 'Division' part.
2nd Jun 2017, 3:03 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 4
Yep, typos are nasty ;)
2nd Jun 2017, 4:47 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
Ooh Thanks kuba đŸ˜±đŸ˜±I was missing the spelling
2nd Jun 2017, 3:05 PM
sam agrawal
sam agrawal - avatar
0
can u please explain what should I type ?
2nd Jun 2017, 1:31 PM
sam agrawal
sam agrawal - avatar
0
ZeroDivisionError there is an 'i' after the 's'
13th Jun 2022, 10:31 PM
Santoshi Sutrave