From 31c105ce49c80ff35fc25435657edecf6544a3c8 Mon Sep 17 00:00:00 2001 From: Zeheng Li Date: Thu, 15 Feb 2024 10:52:24 -0700 Subject: [PATCH] add example --- src/calculator.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/calculator.py diff --git a/src/calculator.py b/src/calculator.py new file mode 100644 index 0000000..c8197bb --- /dev/null +++ b/src/calculator.py @@ -0,0 +1,5 @@ +while True: + try: + print(f"{eval(input()):.2f}") + except: + break