diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-03 07:56:37 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-03 07:56:37 +0000 |
commit | fbb1f33c4f953799f40fb9667ad5360984937fd7 (patch) | |
tree | 90b5f2602037895ef0b3d07743fd43a4ce0e0550 /wk6/lect/calculator.py | |
parent | 371c981570269ff8849feaca5ddeddbacfce2c10 (diff) |
Fri, May 3, 2024, 12:56 AM -07:00
Diffstat (limited to 'wk6/lect/calculator.py')
-rw-r--r-- | wk6/lect/calculator.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wk6/lect/calculator.py b/wk6/lect/calculator.py index 3f39e13..102869b 100644 --- a/wk6/lect/calculator.py +++ b/wk6/lect/calculator.py @@ -12,7 +12,11 @@ # print(f"{z:.50f}") def get_int(prompt): - return int(input(prompt)) + while True: + try: + return int(input(prompt)) + except ValueError: + print("Not an integer!!! :(:(:(") def main(): |