Skip to content

Commit 773946b

Browse files
committed
Create d3_exercise_calculator.py
1 parent a93da89 commit 773946b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
a=float(input("请输入第一个数字:"))
2+
b=input("请输入运算符号:")
3+
c=float(input("请输入第二个数字"))
4+
if b=="+":
5+
print(a+c)
6+
elif b=="-":
7+
print(a-c)
8+
elif b=="*":
9+
print(a*c)
10+
elif b=="/":
11+
print(a/c)
12+

0 commit comments

Comments
 (0)