micropython/tests/basics/int_divzero.py

10 wiersze
146 B
Python

try:
1 // 0
except ZeroDivisionError:
print("ZeroDivisionError")
try:
1 % 0
except ZeroDivisionError:
print("ZeroDivisionError")