Skip to content

Commit d68f6f2

Browse files
chengfeng195seven-tears
authored andcommitted
(1901100068)自学训练营学习15群 DAY3 (#4768)
* wo1 we1 * Create 1001s02E02_hello_python.py * Update 1001s02E02_hello_python.py * Create 1001S02E03_calculator.py
1 parent 62d396b commit d68f6f2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#程序不完善
2+
operator=input('+、-、*、/')
3+
first_number=input('数值one')
4+
second_number=input('数值two')
5+
6+
a=int(first_number)
7+
b=int(second_number)
8+
9+
if operator=='+':
10+
print(a,'+',b,'=',a+b)
11+
elif operator=='-':
12+
print(a,'-',b,'=',a-b)
13+
elif operator=='*':
14+
print(a,'*',b,'=',a*b)
15+
elif operator=='/':
16+
print(a,'/',b,'=',a/b)
17+
else:
18+
print('程序有待完善')

0 commit comments

Comments
 (0)