diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-31 12:01:09 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-31 12:01:09 +0100 |
commit | 1aa2c1026348b057dca2008a165c6d4341a66606 (patch) | |
tree | 2ff1af1263d3947631e1af33697393e699f6d383 /tests/basics/float1.py | |
parent | 523b575039d96d63669ad8c1fa318ba4db046aca (diff) | |
parent | 6ded55a61f6bbf007d518fc4531287de08fe51c4 (diff) |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests/basics/float1.py')
-rw-r--r-- | tests/basics/float1.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/float1.py b/tests/basics/float1.py index 200d95585..bf1305c3d 100644 --- a/tests/basics/float1.py +++ b/tests/basics/float1.py @@ -1,3 +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") |