We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ff9fee commit 5a070f0Copy full SHA for 5a070f0
basic_cal.py
@@ -0,0 +1,8 @@
1
+while True:
2
+ try:
3
+ print(eval(input("enter digits with operator (e.g. 5+5)\n")))
4
+ except:
5
+ print("Invalid Input, try again..")
6
+
7
+# Simple Calculator using eval() in Python
8
+# This calculator takes user input like "5+5" or "10/2" and shows the result.
0 commit comments