From 077106224248499c3d9666abf5f58d5859daed7e Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Tue, 6 Aug 2019 19:31:24 +0800 Subject: [PATCH 01/10] Create 1901100251 --- exercises/1901100251 | 1 + 1 file changed, 1 insertion(+) create mode 100644 exercises/1901100251 diff --git a/exercises/1901100251 b/exercises/1901100251 new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/exercises/1901100251 @@ -0,0 +1 @@ + From 942789698b8094b2994c42d9c0363da24453666f Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Tue, 6 Aug 2019 19:31:54 +0800 Subject: [PATCH 02/10] Delete 1901100251 --- exercises/1901100251 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 exercises/1901100251 diff --git a/exercises/1901100251 b/exercises/1901100251 deleted file mode 100644 index 8b1378917..000000000 --- a/exercises/1901100251 +++ /dev/null @@ -1 +0,0 @@ - From 18711a3f02d67e59f1f20a55fec5aae05372af0d Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Tue, 6 Aug 2019 19:35:09 +0800 Subject: [PATCH 03/10] Create README.md --- exercises/1901100251/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 exercises/1901100251/README.md diff --git a/exercises/1901100251/README.md b/exercises/1901100251/README.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/exercises/1901100251/README.md @@ -0,0 +1 @@ + From 8406b876d12e0ac3b312c55b74c713568fa5acd3 Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Tue, 6 Aug 2019 19:37:10 +0800 Subject: [PATCH 04/10] Create 1001S02E01_helloworld.txt --- exercises/1901100251/1001S02E01_helloworld.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 exercises/1901100251/1001S02E01_helloworld.txt diff --git a/exercises/1901100251/1001S02E01_helloworld.txt b/exercises/1901100251/1001S02E01_helloworld.txt new file mode 100644 index 000000000..1c4e4d60d --- /dev/null +++ b/exercises/1901100251/1001S02E01_helloworld.txt @@ -0,0 +1 @@ +Everything seems difficult before it becomes easy. From ea46a8c5975c442b20c2d88a117cc49a27fd66c5 Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Sun, 11 Aug 2019 14:59:16 +0800 Subject: [PATCH 05/10] Create 1001S02E03_calculator.py --- exercises/1901100251/1001S02E03_calculator.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 exercises/1901100251/1001S02E03_calculator.py diff --git a/exercises/1901100251/1001S02E03_calculator.py b/exercises/1901100251/1001S02E03_calculator.py new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/exercises/1901100251/1001S02E03_calculator.py @@ -0,0 +1 @@ + From 3e53f8fbecf34bdd2c727c68ae8104c073a29b81 Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Sun, 18 Aug 2019 13:41:05 +0800 Subject: [PATCH 06/10] Create 1001S02E02_hello_python.py --- exercises/1901100251/1001S02E02_hello_python.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 exercises/1901100251/1001S02E02_hello_python.py diff --git a/exercises/1901100251/1001S02E02_hello_python.py b/exercises/1901100251/1001S02E02_hello_python.py new file mode 100644 index 000000000..665c637a3 --- /dev/null +++ b/exercises/1901100251/1001S02E02_hello_python.py @@ -0,0 +1 @@ +print("hello world!") From b53daec9c4e95a21b544cf2dfd67bcd900bd7b47 Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Sun, 18 Aug 2019 13:43:43 +0800 Subject: [PATCH 07/10] Update 1001S02E02_hello_python.py --- exercises/1901100251/1001S02E02_hello_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/1901100251/1001S02E02_hello_python.py b/exercises/1901100251/1001S02E02_hello_python.py index 665c637a3..a50a5fc5d 100644 --- a/exercises/1901100251/1001S02E02_hello_python.py +++ b/exercises/1901100251/1001S02E02_hello_python.py @@ -1 +1 @@ -print("hello world!") +print ("hello world!") From 91dbb105bb75e0b0bfd97d3022d93d318b8c6bee Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Thu, 22 Aug 2019 00:02:14 +0800 Subject: [PATCH 08/10] Update 1001S02E03_calculator.py --- exercises/1901100251/1001S02E03_calculator.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/exercises/1901100251/1001S02E03_calculator.py b/exercises/1901100251/1001S02E03_calculator.py index 8b1378917..3fcca9b13 100644 --- a/exercises/1901100251/1001S02E03_calculator.py +++ b/exercises/1901100251/1001S02E03_calculator.py @@ -1 +1,27 @@ +print('===================自制计算器====================') +a = float(input('请输入第一个数字:')) +b = input('请输入运算符(+,-,*,/):') +c = float(input('请输入第二个数字:')) +add = a + c +#减法 +sub = a - c +#乘法 +times = a * c +#除法 +division = a / c +print('====================输出结果=====================') +if b == '+': + print('您输入的加法运算结果为: %f'%add) + +elif b == '-': + print('您输入的减法运算结果为: %f'%sub) + +elif b == '*': + print('您输入的乘法运算结果为: %f'%times) + +elif b == '/': + print('您输入的除法运算结果为: %f'%division) +else : + print('您输入的运算符有误!') +print('================================================') From d7082a84d0bdf4223343fd4281fd28f5ca76b1ab Mon Sep 17 00:00:00 2001 From: bennymoqin <30627043+bennymoqin@users.noreply.github.com> Date: Fri, 23 Aug 2019 09:53:20 +0800 Subject: [PATCH 09/10] Create 1001S02E04_control_flow.py --- exercises/1901100251/1001S02E04_control_flow.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 exercises/1901100251/1001S02E04_control_flow.py diff --git a/exercises/1901100251/1001S02E04_control_flow.py b/exercises/1901100251/1001S02E04_control_flow.py new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/exercises/1901100251/1001S02E04_control_flow.py @@ -0,0 +1 @@ + From dec2fcaab20765438ce8f96963fa4634ab4691cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=99=93=E5=BD=AC?= Date: Fri, 23 Aug 2019 10:36:45 +0800 Subject: [PATCH 10/10] Update 1001S02E04_control_flow.py --- .../1901100251/1001S02E04_control_flow.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/exercises/1901100251/1001S02E04_control_flow.py b/exercises/1901100251/1001S02E04_control_flow.py index 8b1378917..636ee11e1 100644 --- a/exercises/1901100251/1001S02E04_control_flow.py +++ b/exercises/1901100251/1001S02E04_control_flow.py @@ -1 +1,23 @@ +#使⽤for...in循环打印九九乘法表 +for a in range (1,10): + for b in range (1,10): + print (a,"x",b, "=",a*b,"\t", end= "") + if a == b: + print ("") + break + + + + + +#使用while循环打印九九乘法表并⽤条件判断把偶数行去除掉 +for a in range (1,10): + for b in range (1,10): + while a % 2 == 0: + break + else: + print(a,"x",b,"=",a*b,"\t", end="") + if a == b: + print ("") + break \ No newline at end of file