diff options
Diffstat (limited to 'tests/float/float1.py')
-rw-r--r-- | tests/float/float1.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/float/float1.py b/tests/float/float1.py new file mode 100644 index 0000000000..bf1305c3d5 --- /dev/null +++ b/tests/float/float1.py @@ -0,0 +1,16 @@ +# basic float +x = 1 / 2 +print(x) + +print(1.0 // 2) +print(2.0 // 2) + +try: + 1.0 / 0 +except ZeroDivisionError: + print("ZeroDivisionError") + +try: + 1.0 // 0 +except ZeroDivisionError: + print("ZeroDivisionError") |