diff --git a/exercises/1901100297/1001S02E01_helloworld.txt b/exercises/1901100297/1001S02E01_helloworld.txt new file mode 100644 index 000000000..23c83a622 --- /dev/null +++ b/exercises/1901100297/1001S02E01_helloworld.txt @@ -0,0 +1 @@ +balababal \ No newline at end of file diff --git a/exercises/1901100297/1001S02E02_hello_python.py b/exercises/1901100297/1001S02E02_hello_python.py new file mode 100644 index 000000000..7593920e0 --- /dev/null +++ b/exercises/1901100297/1001S02E02_hello_python.py @@ -0,0 +1,2 @@ +msg = "Hello World" +print(msg) \ No newline at end of file diff --git a/exercises/1901100297/1001S02E03_calculator.py b/exercises/1901100297/1001S02E03_calculator.py new file mode 100644 index 000000000..c1808bfbe --- /dev/null +++ b/exercises/1901100297/1001S02E03_calculator.py @@ -0,0 +1,43 @@ +print('我们来做四则运算,请选择你的运算类型') +print('1,加法') +print('2,减法') +print('3,乘法') +print('4,除法') + +choice = input("选择运算类型(1/2/3/4)") + +if choice =='1': + print("第一个数") + a=input() + x=int(a) + print('第二个数') + b=input() + y=int(b) + print("结果",x+y) + +elif choice =='2': + print("第一个数") + a=input() + x=int(a) + print('第二个数') + b=input() + y=int(b) + print("结果",x-y) + +elif choice =='3': + print("第一个数") + a=input() + x=int(a) + print('第二个数') + b=input() + y=int(b) + print("结果",x*y) + +elif choice =='4': + print("第一个数") + a=input() + x=int(a) + print('第二个数') + b=input() + y=int(b) + print("结果",x/y) diff --git a/exercises/1901100297/README.md b/exercises/1901100297/README.md new file mode 100644 index 000000000..e69de29bb