From 398ea4ae5a132e33dbc28e64704f3c4cf5e77767 Mon Sep 17 00:00:00 2001 From: tasethan Date: Fri, 13 Dec 2019 17:24:11 +0800 Subject: [PATCH 01/32] chess floor --- chess floor.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 chess floor.py diff --git a/chess floor.py b/chess floor.py new file mode 100644 index 0000000..44952f2 --- /dev/null +++ b/chess floor.py @@ -0,0 +1,24 @@ +import turtle as t +t.setup(500, 500) +t.ht() +def chess_floor(): + t.begin_fill() + for c in range(4): + t.forward(10) + t.right(90) + t.end_fill() + + +def chessfloor(): + for c in range(4): + t.forward(10) + t.right(90) +chess_floor() +t.forward(10) +chessfloor() +t.right(90) +t.forward(10) +chessfloor() +t.right(-90) +chess_floor() +t.done() \ No newline at end of file -- Gitee From 2a1f6673e62b69b1650bd37b7682381397da5f3e Mon Sep 17 00:00:00 2001 From: Coach W Date: Fri, 13 Dec 2019 22:48:54 +0800 Subject: [PATCH 02/32] demo 13.1 for illustrating Fork+Pull workflow --- demo_practice.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 demo_practice.txt diff --git a/demo_practice.txt b/demo_practice.txt new file mode 100644 index 0000000..9259b8f --- /dev/null +++ b/demo_practice.txt @@ -0,0 +1,14 @@ +知识点:Fork+Pull工作流 + +Demo 13.1 +========== + +这是个Demo任务,目的是演示Fork+Pull工作流。 + +** 任务描述 ** + +新建一个蓝底白字的窗口,在屏幕中心显示"DEMO"。 + +** 提交 ** +1. 添加remote仓库Moleqode/practice,起名为upstream。 +2. 以Pull Request的方式提交到 upstream: exercise 分支。 \ No newline at end of file -- Gitee From fefae180b03876cfb193b991594140cadf070d15 Mon Sep 17 00:00:00 2001 From: Coach W Date: Sat, 14 Dec 2019 10:26:22 +0800 Subject: [PATCH 03/32] completed demo practice 13.1 --- demo.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 demo.py diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..e2f8651 --- /dev/null +++ b/demo.py @@ -0,0 +1,10 @@ +import turtle + +t = turtle.Turtle('blank') +stage = turtle.Screen() + +stage.bgcolor('navy') +t.pencolor('white') +t.write('DEMO', align='center', font=('Cambria', 100, 'bold')) + +stage.mainloop() \ No newline at end of file -- Gitee From 9bb0f8a5285eebf329322f846614d57b76501602 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 15 Dec 2019 10:17:31 +0800 Subject: [PATCH 04/32] 1st version --- chess floor 8x8.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 chess floor 8x8.py diff --git a/chess floor 8x8.py b/chess floor 8x8.py new file mode 100644 index 0000000..10b88a0 --- /dev/null +++ b/chess floor 8x8.py @@ -0,0 +1,26 @@ +import turtle as t +t.setup(500, 500) +#t.ht() +def chess_floor(): + t.begin_fill() + for c in range(4): + t.forward(10) + t.right(90) + t.end_fill() +def chessfloor(): + for c in range(4): + t.forward(10) + t.right(90) +for c in range(4): + chess_floor() + t.forward(10) + chessfloor() + t.right(90) + t.forward(10) + chessfloor() + t.right(-90) + chess_floor() + t.forward(10) + t.right(90) + t.forward(10) +t.done() \ No newline at end of file -- Gitee From 03a7f09791b2b332be15058338a103d4fdb6ea6e Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 15 Dec 2019 18:47:07 +0800 Subject: [PATCH 05/32] 1st version --- chess_floor.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 chess_floor.py diff --git a/chess_floor.py b/chess_floor.py new file mode 100644 index 0000000..1256f7f --- /dev/null +++ b/chess_floor.py @@ -0,0 +1,27 @@ +import turtle as t +t.setup(500, 500) +t.speed('fastest') +def block(size, filled): + if filled == True: + t.begin_fill() + for c in range(4): + t.forward(size) + t.right(90) + if filled == True: + t.end_fill() + +size = 10 +num = 8 +filled = True +for c in range(1, num*num+1): + block(size, filled) + if c%num == 0: + t.sety(t.ycor()-size) + t.setx(0) + else: + t.forward(size) + if filled == True: + filled = False + else: + filled = True +t.done() \ No newline at end of file -- Gitee From 8369594ad506765d5ad7ddf19f65534783be94c0 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 15 Dec 2019 18:49:00 +0800 Subject: [PATCH 06/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ch?= =?UTF-8?q?ess=20floor=208x8.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess floor 8x8.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 chess floor 8x8.py diff --git a/chess floor 8x8.py b/chess floor 8x8.py deleted file mode 100644 index 10b88a0..0000000 --- a/chess floor 8x8.py +++ /dev/null @@ -1,26 +0,0 @@ -import turtle as t -t.setup(500, 500) -#t.ht() -def chess_floor(): - t.begin_fill() - for c in range(4): - t.forward(10) - t.right(90) - t.end_fill() -def chessfloor(): - for c in range(4): - t.forward(10) - t.right(90) -for c in range(4): - chess_floor() - t.forward(10) - chessfloor() - t.right(90) - t.forward(10) - chessfloor() - t.right(-90) - chess_floor() - t.forward(10) - t.right(90) - t.forward(10) -t.done() \ No newline at end of file -- Gitee From 53b9c99125d2cff63b29c8cb6bbb16467cce0620 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 15 Dec 2019 20:24:28 +0800 Subject: [PATCH 07/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ch?= =?UTF-8?q?ess=20floor.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess floor.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 chess floor.py diff --git a/chess floor.py b/chess floor.py deleted file mode 100644 index 44952f2..0000000 --- a/chess floor.py +++ /dev/null @@ -1,24 +0,0 @@ -import turtle as t -t.setup(500, 500) -t.ht() -def chess_floor(): - t.begin_fill() - for c in range(4): - t.forward(10) - t.right(90) - t.end_fill() - - -def chessfloor(): - for c in range(4): - t.forward(10) - t.right(90) -chess_floor() -t.forward(10) -chessfloor() -t.right(90) -t.forward(10) -chessfloor() -t.right(-90) -chess_floor() -t.done() \ No newline at end of file -- Gitee From d52587c118c9ba21bf8a5358255f5d7931db4ccd Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 15 Dec 2019 20:24:50 +0800 Subject: [PATCH 08/32] update chess_floor.py. --- chess_floor.py => chess_floor_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename chess_floor.py => chess_floor_ethan.py (100%) diff --git a/chess_floor.py b/chess_floor_ethan.py similarity index 100% rename from chess_floor.py rename to chess_floor_ethan.py -- Gitee From 5582a0d8cd8986a55ad74a46b7f41d7507755a6f Mon Sep 17 00:00:00 2001 From: Coach W Date: Sun, 15 Dec 2019 23:46:49 +0800 Subject: [PATCH 09/32] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E7=9A=84=E7=AC=AC13=E5=91=A8=E8=AF=BE=E5=90=8E=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_FIRST.txt | 14 ++++++++ demo.py | 15 ++++++++ demo_practice.txt | 14 -------- ... \345\233\233\346\226\271\346\240\274.txt" | 4 +++ ...2\347\224\261\345\233\276\345\275\242.txt" | 21 +++++++++++ ...5\350\261\241\346\243\213\347\233\230.txt" | 35 +++++++++++++++++++ ...0\350\212\261\346\270\270\346\210\217.txt" | 25 +++++++++++++ names.txt | 3 +- 8 files changed, 116 insertions(+), 15 deletions(-) create mode 100644 README_FIRST.txt delete mode 100644 demo_practice.txt rename ex13_1.txt => "ex13_1 \345\233\233\346\226\271\346\240\274.txt" (80%) create mode 100644 "ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" create mode 100644 "ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" create mode 100644 "ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" diff --git a/README_FIRST.txt b/README_FIRST.txt new file mode 100644 index 0000000..71c066c --- /dev/null +++ b/README_FIRST.txt @@ -0,0 +1,14 @@ +第十三周训练 + +本周学习的主要内容是代码仓库和Git命令操作。 + +通过本周的学习,同学们将: +1. 熟悉软件开发世界最常用而且重要的工具——代码仓库 +2. 形成对Git工作流的初步理解 +3. 获得与他人在线分享交流代码的能力 + +** 训练内容 ** +1. 在家里电脑安装Git软件,并完成PyCharm的插件安装和配置(参见教学视频Video 13.1) +2. 通过教学视频,巩固课上学习的Fork+Pull工作流(参见教学视频Video 13.2-13.3[1/2]) +3. 完成ex13.1-13.3三个编程任务,并通过代码仓库提交 +4. 完成ex13.4中的课后游戏 \ No newline at end of file diff --git a/demo.py b/demo.py index e2f8651..6e63488 100644 --- a/demo.py +++ b/demo.py @@ -1,3 +1,18 @@ +# 知识点:Fork+Pull工作流 +# +# Demo 13.1 +# ========== +# +# 这是个Demo任务,目的是演示Fork+Pull工作流。 +# +# ** 任务描述 ** +# +# 新建一个蓝底白字的窗口,在屏幕中心显示"DEMO"。 +# +# ** 提交 ** +# 1. 添加remote仓库Moleqode/practice,起名为upstream。 +# 2. 以Pull Request的方式提交到 upstream: exercise 分支。 + import turtle t = turtle.Turtle('blank') diff --git a/demo_practice.txt b/demo_practice.txt deleted file mode 100644 index 9259b8f..0000000 --- a/demo_practice.txt +++ /dev/null @@ -1,14 +0,0 @@ -知识点:Fork+Pull工作流 - -Demo 13.1 -========== - -这是个Demo任务,目的是演示Fork+Pull工作流。 - -** 任务描述 ** - -新建一个蓝底白字的窗口,在屏幕中心显示"DEMO"。 - -** 提交 ** -1. 添加remote仓库Moleqode/practice,起名为upstream。 -2. 以Pull Request的方式提交到 upstream: exercise 分支。 \ No newline at end of file diff --git a/ex13_1.txt "b/ex13_1 \345\233\233\346\226\271\346\240\274.txt" similarity index 80% rename from ex13_1.txt rename to "ex13_1 \345\233\233\346\226\271\346\240\274.txt" index d37e06e..036a0bb 100644 --- a/ex13_1.txt +++ "b/ex13_1 \345\233\233\346\226\271\346\240\274.txt" @@ -18,3 +18,7 @@ Ex13.1 四方格 3. 将这个提交推送(push)到你的码云仓库 4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 +** 提交截止时间 ** + +请于下周四(12/19)晚8点前提交你的作业。 +参考答案将在当晚8:30,在Moleqode/practice的master分支上发布。 \ No newline at end of file diff --git "a/ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" "b/ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" new file mode 100644 index 0000000..2dcbd64 --- /dev/null +++ "b/ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" @@ -0,0 +1,21 @@ +Ex13.2 数学图形 + +** 任务描述 ** + +使用海龟作图,任意创作一个你喜爱的数学图形。 + +要求: +1. 使用到填色和多边形 +2. 用注释解释与图形相关的数学知识 + +** 提交方式 ** + +1. 将程序文件名保存为graph_.py,其中是你的名字。例如graph_cindy.py +2. 将程序提交(commit)到本地仓库 +3. 将这个提交推送(push)到你的码云仓库 +4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 + +** 提交截止时间 ** + +请于下周四(12/19)晚8点前提交你的作业。 + diff --git "a/ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" "b/ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" new file mode 100644 index 0000000..49275d0 --- /dev/null +++ "b/ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" @@ -0,0 +1,35 @@ +知识点: 填充色、多重循环 + +本题目为可选作业,你需要预先完成Ex13.1四方格练习题。 + +Ex13.3 国际象棋盘 +================ + +将四方格程序扩展成一个8x8国际象棋盘。 + +** 任务描述 ** + +1. 用海龟作图绘制一个横纵方向均为8个正方格、黑白格相间的国际象棋盘 +2. 每个格子的边长为50像素 +3. 左上角格子颜色为黑色 + +** 解法提示 ** + +使用程序设计五步法(参见教学视频12.1): +1. 观察、发现国际象棋盘的画法中隐藏的规律 +2. 思考如何决定每个格子的位置和颜色 +3. 开始编程前,尝试描述你的解法思路。鼓励绘制出流程图 + +** 提交方式 ** + +1. 将程序文件名保存为chessboard_.py,其中是你的名字。例如chessboard_cindy.py +2. 将程序提交(commit)到本地仓库 +3. 将这个提交推送(push)到你的码云仓库 +4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 + +** 提交截止时间 ** + +请于下周四(12/19)晚8点前提交你的作业。 +参考答案将在当晚8:30,在Moleqode/practice的master分支上发布。 + + diff --git "a/ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" "b/ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" new file mode 100644 index 0000000..39ea31c --- /dev/null +++ "b/ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" @@ -0,0 +1,25 @@ +知识点:Pull Request、合并冲突 + +Ex13.4 击鼓传花游戏 + +** 游戏规则 ** + +1. 每个同学把自己的名字加入到names.txt文件中,然后提交PR给Moleqode管理员。 +2. 每天管理员只接受收到的前2个PR请求,而关闭后面的请求。 +3. PR未被接受的同学,应重新提交PR,直到被管理员批准为止。 + +游戏结束后按PR被批准的先后次序排名。 + +** 游戏准备 ** + +添加 Moleqode/practice 仓库为Remote,命名为upstream + +** 游戏步骤 ** + +1. Pull upstream:game 分支的最新内容 +2. 打开names.txt,在文件末尾另起一行,加入自己的名字 +3. Commit/Push结果到你在码云上的仓库Origin +4. 提交一个PR到game分支 +5. 每隔一段时间重新执行第1步,直到收到新的更新为止 + +如果你的PR已经被接受,游戏通过;否则重复执行第2-5步,重新修改names.txt文件并提交PR请求 \ No newline at end of file diff --git a/names.txt b/names.txt index 851fa89..2caaf16 100644 --- a/names.txt +++ b/names.txt @@ -1 +1,2 @@ -# add your name as a separate line at the end of the file \ No newline at end of file +# Ex13.4 击鼓传花游戏 +# 在文件末尾另起一行,输入你的名字 -- Gitee From 0047d1e1c63e9cad63ffc24ab6e5546750c7c03a Mon Sep 17 00:00:00 2001 From: Coach W Date: Mon, 16 Dec 2019 23:24:56 +0800 Subject: [PATCH 10/32] =?UTF-8?q?=E6=B7=BB=E5=8A=A013.5=E5=85=AB=E7=9A=87?= =?UTF-8?q?=E5=90=8E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\345\255\246\345\233\276\345\275\242.txt" | 0 ...7\345\220\216\351\227\256\351\242\230.txt" | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+) rename "ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" => "ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" (100%) create mode 100644 "ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" diff --git "a/ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" "b/ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" similarity index 100% rename from "ex13_2 \350\207\252\347\224\261\345\233\276\345\275\242.txt" rename to "ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" diff --git "a/ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" "b/ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" new file mode 100644 index 0000000..f984605 --- /dev/null +++ "b/ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" @@ -0,0 +1,29 @@ +知识点:算法 + +Ex13.5 八皇后问题 + +在国际象棋的玩法中,皇后可以在横、纵、斜方向上,不受距离限制地吃掉直接遇到地任何棋子。 + +** 任务描述 ** + +请把八个皇后放到国际棋盘上,使任何两个皇后之间都不能吃到对方。 + +创建长度为8的pos[row_idx]列表,其中row_idx代表行标,pos[row_idx]代表在一行上的位置,也就是列标。 +例如:[5, 2, 0, 7, 4, 1, 3, 6] + +1. [初级难度] 编程验证一种解法是否正确 +2. [初级难度] 编程找出一种正确的解法 +3. [中级难度] 用海龟作图绘制出一种给定的解法 +4. [高级难度] 统计共有几种解法 + +** 提交方式 ** + +1. 将程序文件名保存为queens_.py,其中是你的名字。例如queens_cindy.py +2. 将程序提交(commit)到本地仓库 +3. 将这个提交推送(push)到你的码云仓库 +4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 + +** 提交截止时间 ** + +请于下周四(12/19)晚8点前提交你的作业。 +参考答案将在当晚8:30,在Moleqode/practice的master分支上发布。 \ No newline at end of file -- Gitee From 4856e70db5c5216a2bc69a82446e529f1f7dc5e2 Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 18 Dec 2019 19:32:56 +0800 Subject: [PATCH 11/32] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20chess=5Fflo?= =?UTF-8?q?or=5Fethan.py=20=E4=B8=BA=20chess=5Ffloor.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess_floor_ethan.py => chess_floor.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename chess_floor_ethan.py => chess_floor.py (100%) diff --git a/chess_floor_ethan.py b/chess_floor.py similarity index 100% rename from chess_floor_ethan.py rename to chess_floor.py -- Gitee From 05ceca28993657245b51381f1fdac74fa13d3880 Mon Sep 17 00:00:00 2001 From: Ethan Date: Thu, 19 Dec 2019 19:41:58 +0800 Subject: [PATCH 12/32] update --- chess floor 8x8.py | 26 -------------------------- chess floor.py | 6 +++++- chess_floor.py | 2 +- graph_ethan.py | 0 4 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 chess floor 8x8.py create mode 100644 graph_ethan.py diff --git a/chess floor 8x8.py b/chess floor 8x8.py deleted file mode 100644 index 10b88a0..0000000 --- a/chess floor 8x8.py +++ /dev/null @@ -1,26 +0,0 @@ -import turtle as t -t.setup(500, 500) -#t.ht() -def chess_floor(): - t.begin_fill() - for c in range(4): - t.forward(10) - t.right(90) - t.end_fill() -def chessfloor(): - for c in range(4): - t.forward(10) - t.right(90) -for c in range(4): - chess_floor() - t.forward(10) - chessfloor() - t.right(90) - t.forward(10) - chessfloor() - t.right(-90) - chess_floor() - t.forward(10) - t.right(90) - t.forward(10) -t.done() \ No newline at end of file diff --git a/chess floor.py b/chess floor.py index 44952f2..685054c 100644 --- a/chess floor.py +++ b/chess floor.py @@ -1,6 +1,6 @@ import turtle as t t.setup(500, 500) -t.ht() +t.speed('fastest') def chess_floor(): t.begin_fill() for c in range(4): @@ -21,4 +21,8 @@ t.forward(10) chessfloor() t.right(-90) chess_floor() +t.forward(10) +t.right(90) +t.forward(10) +t.right(90) t.done() \ No newline at end of file diff --git a/chess_floor.py b/chess_floor.py index 1256f7f..bda8794 100644 --- a/chess_floor.py +++ b/chess_floor.py @@ -11,7 +11,7 @@ def block(size, filled): t.end_fill() size = 10 -num = 8 +num = 2 filled = True for c in range(1, num*num+1): block(size, filled) diff --git a/graph_ethan.py b/graph_ethan.py new file mode 100644 index 0000000..e69de29 -- Gitee From b3d57ebc8146a6587720d44d3df85b8512b3cc3a Mon Sep 17 00:00:00 2001 From: Ethan Date: Fri, 20 Dec 2019 14:41:50 +0800 Subject: [PATCH 13/32] Remove graph_ethan.py --- graph_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 graph_ethan.py diff --git a/graph_ethan.py b/graph_ethan.py deleted file mode 100644 index e69de29..0000000 -- Gitee From 5150fa09deb4c38ab5fc9cd1e5a33e2850fcbf0b Mon Sep 17 00:00:00 2001 From: Ethan Date: Tue, 31 Dec 2019 21:23:24 +0800 Subject: [PATCH 14/32] update --- decode_e.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 decode_e.py diff --git a/decode_e.py b/decode_e.py new file mode 100644 index 0000000..0b8e7bd --- /dev/null +++ b/decode_e.py @@ -0,0 +1,3 @@ +n = [0b1000101, 0b1000100, 0b1001111, 0b1010100, 0b1001101] +for c in range(len(n)): + print(chr(n[c]), end='') \ No newline at end of file -- Gitee From 82ad06cf571eeaec569f2c5a00c3d8202b093630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 09:53:00 +0800 Subject: [PATCH 15/32] update decode_e.py. --- decode_e.py => decode_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename decode_e.py => decode_ethan.py (100%) diff --git a/decode_e.py b/decode_ethan.py similarity index 100% rename from decode_e.py rename to decode_ethan.py -- Gitee From cc3a0f86217c57900b57806fd372a13101b34b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:12:14 +0800 Subject: [PATCH 16/32] update chess_floor.py. --- chess_floor.py => chess_floor_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename chess_floor.py => chess_floor_ethan.py (100%) diff --git a/chess_floor.py b/chess_floor_ethan.py similarity index 100% rename from chess_floor.py rename to chess_floor_ethan.py -- Gitee From a60cd925a1656e474c635df04ed5389bbd1b49d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:12:38 +0800 Subject: [PATCH 17/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ch?= =?UTF-8?q?ess=20floor.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess floor.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 chess floor.py diff --git a/chess floor.py b/chess floor.py deleted file mode 100644 index 685054c..0000000 --- a/chess floor.py +++ /dev/null @@ -1,28 +0,0 @@ -import turtle as t -t.setup(500, 500) -t.speed('fastest') -def chess_floor(): - t.begin_fill() - for c in range(4): - t.forward(10) - t.right(90) - t.end_fill() - - -def chessfloor(): - for c in range(4): - t.forward(10) - t.right(90) -chess_floor() -t.forward(10) -chessfloor() -t.right(90) -t.forward(10) -chessfloor() -t.right(-90) -chess_floor() -t.forward(10) -t.right(90) -t.forward(10) -t.right(90) -t.done() \ No newline at end of file -- Gitee From 7b556c9ecbc106de9c21f716842b0053b39ca386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:12:58 +0800 Subject: [PATCH 18/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20de?= =?UTF-8?q?mo.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 demo.py diff --git a/demo.py b/demo.py deleted file mode 100644 index 6e63488..0000000 --- a/demo.py +++ /dev/null @@ -1,25 +0,0 @@ -# 知识点:Fork+Pull工作流 -# -# Demo 13.1 -# ========== -# -# 这是个Demo任务,目的是演示Fork+Pull工作流。 -# -# ** 任务描述 ** -# -# 新建一个蓝底白字的窗口,在屏幕中心显示"DEMO"。 -# -# ** 提交 ** -# 1. 添加remote仓库Moleqode/practice,起名为upstream。 -# 2. 以Pull Request的方式提交到 upstream: exercise 分支。 - -import turtle - -t = turtle.Turtle('blank') -stage = turtle.Screen() - -stage.bgcolor('navy') -t.pencolor('white') -t.write('DEMO', align='center', font=('Cambria', 100, 'bold')) - -stage.mainloop() \ No newline at end of file -- Gitee From 32e43524f33821c07d853102d0833903d156d148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:08 +0800 Subject: [PATCH 19/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20RE?= =?UTF-8?q?ADME=5FFIRST.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_FIRST.txt | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 README_FIRST.txt diff --git a/README_FIRST.txt b/README_FIRST.txt deleted file mode 100644 index 71c066c..0000000 --- a/README_FIRST.txt +++ /dev/null @@ -1,14 +0,0 @@ -第十三周训练 - -本周学习的主要内容是代码仓库和Git命令操作。 - -通过本周的学习,同学们将: -1. 熟悉软件开发世界最常用而且重要的工具——代码仓库 -2. 形成对Git工作流的初步理解 -3. 获得与他人在线分享交流代码的能力 - -** 训练内容 ** -1. 在家里电脑安装Git软件,并完成PyCharm的插件安装和配置(参见教学视频Video 13.1) -2. 通过教学视频,巩固课上学习的Fork+Pull工作流(参见教学视频Video 13.2-13.3[1/2]) -3. 完成ex13.1-13.3三个编程任务,并通过代码仓库提交 -4. 完成ex13.4中的课后游戏 \ No newline at end of file -- Gitee From bcc931f8fab256377e1ec3f406088582c1cda299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:18 +0800 Subject: [PATCH 20/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ex?= =?UTF-8?q?13=5F1=20=E5=9B=9B=E6=96=B9=E6=A0=BC.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... \345\233\233\346\226\271\346\240\274.txt" | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 "ex13_1 \345\233\233\346\226\271\346\240\274.txt" diff --git "a/ex13_1 \345\233\233\346\226\271\346\240\274.txt" "b/ex13_1 \345\233\233\346\226\271\346\240\274.txt" deleted file mode 100644 index 036a0bb..0000000 --- "a/ex13_1 \345\233\233\346\226\271\346\240\274.txt" +++ /dev/null @@ -1,24 +0,0 @@ -知识点: 填充色、多重循环 - -Ex13.1 四方格 -============= - -同学们都能轻轻松松画出一个正方形,甚至给它填充颜色,所以这道习题我们增加一点难度。 - -** 任务描述 ** - -1. 用海龟作图绘制一个2*2的四方格 -2. 把左上角和右下角的两个格子涂成黑色 -3. 保留右上角和左下角两个格子的白色 - -** 提交方式 ** - -1. 将程序文件名保存为square_.py,其中是你的名字。例如square_cindy.py -2. 将程序提交(commit)到本地仓库 -3. 将这个提交推送(push)到你的码云仓库 -4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 - -** 提交截止时间 ** - -请于下周四(12/19)晚8点前提交你的作业。 -参考答案将在当晚8:30,在Moleqode/practice的master分支上发布。 \ No newline at end of file -- Gitee From ce5d2ad351b1ce22d665976be0339bafbca03462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:24 +0800 Subject: [PATCH 21/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ex?= =?UTF-8?q?13=5F2=20=E6=95=B0=E5=AD=A6=E5=9B=BE=E5=BD=A2.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\345\255\246\345\233\276\345\275\242.txt" | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 "ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" diff --git "a/ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" "b/ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" deleted file mode 100644 index 2dcbd64..0000000 --- "a/ex13_2 \346\225\260\345\255\246\345\233\276\345\275\242.txt" +++ /dev/null @@ -1,21 +0,0 @@ -Ex13.2 数学图形 - -** 任务描述 ** - -使用海龟作图,任意创作一个你喜爱的数学图形。 - -要求: -1. 使用到填色和多边形 -2. 用注释解释与图形相关的数学知识 - -** 提交方式 ** - -1. 将程序文件名保存为graph_.py,其中是你的名字。例如graph_cindy.py -2. 将程序提交(commit)到本地仓库 -3. 将这个提交推送(push)到你的码云仓库 -4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 - -** 提交截止时间 ** - -请于下周四(12/19)晚8点前提交你的作业。 - -- Gitee From 801fdb8a59bf42d7e283c72793732eab8cc49b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:29 +0800 Subject: [PATCH 22/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ex?= =?UTF-8?q?13=5F3=20=E5=9B=BD=E9=99=85=E8=B1=A1=E6=A3=8B=E7=9B=98.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5\350\261\241\346\243\213\347\233\230.txt" | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 "ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" diff --git "a/ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" "b/ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" deleted file mode 100644 index 49275d0..0000000 --- "a/ex13_3 \345\233\275\351\231\205\350\261\241\346\243\213\347\233\230.txt" +++ /dev/null @@ -1,35 +0,0 @@ -知识点: 填充色、多重循环 - -本题目为可选作业,你需要预先完成Ex13.1四方格练习题。 - -Ex13.3 国际象棋盘 -================ - -将四方格程序扩展成一个8x8国际象棋盘。 - -** 任务描述 ** - -1. 用海龟作图绘制一个横纵方向均为8个正方格、黑白格相间的国际象棋盘 -2. 每个格子的边长为50像素 -3. 左上角格子颜色为黑色 - -** 解法提示 ** - -使用程序设计五步法(参见教学视频12.1): -1. 观察、发现国际象棋盘的画法中隐藏的规律 -2. 思考如何决定每个格子的位置和颜色 -3. 开始编程前,尝试描述你的解法思路。鼓励绘制出流程图 - -** 提交方式 ** - -1. 将程序文件名保存为chessboard_.py,其中是你的名字。例如chessboard_cindy.py -2. 将程序提交(commit)到本地仓库 -3. 将这个提交推送(push)到你的码云仓库 -4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 - -** 提交截止时间 ** - -请于下周四(12/19)晚8点前提交你的作业。 -参考答案将在当晚8:30,在Moleqode/practice的master分支上发布。 - - -- Gitee From 994a30476dd2e13075fdcae9b97fb7385629d6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:35 +0800 Subject: [PATCH 23/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ex?= =?UTF-8?q?13=5F4=20=E5=87=BB=E9=BC=93=E4=BC=A0=E8=8A=B1=E6=B8=B8=E6=88=8F?= =?UTF-8?q?.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\350\212\261\346\270\270\346\210\217.txt" | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 "ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" diff --git "a/ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" "b/ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" deleted file mode 100644 index 39ea31c..0000000 --- "a/ex13_4 \345\207\273\351\274\223\344\274\240\350\212\261\346\270\270\346\210\217.txt" +++ /dev/null @@ -1,25 +0,0 @@ -知识点:Pull Request、合并冲突 - -Ex13.4 击鼓传花游戏 - -** 游戏规则 ** - -1. 每个同学把自己的名字加入到names.txt文件中,然后提交PR给Moleqode管理员。 -2. 每天管理员只接受收到的前2个PR请求,而关闭后面的请求。 -3. PR未被接受的同学,应重新提交PR,直到被管理员批准为止。 - -游戏结束后按PR被批准的先后次序排名。 - -** 游戏准备 ** - -添加 Moleqode/practice 仓库为Remote,命名为upstream - -** 游戏步骤 ** - -1. Pull upstream:game 分支的最新内容 -2. 打开names.txt,在文件末尾另起一行,加入自己的名字 -3. Commit/Push结果到你在码云上的仓库Origin -4. 提交一个PR到game分支 -5. 每隔一段时间重新执行第1步,直到收到新的更新为止 - -如果你的PR已经被接受,游戏通过;否则重复执行第2-5步,重新修改names.txt文件并提交PR请求 \ No newline at end of file -- Gitee From 3e21d92748b8170fdd56545192c73296d49f4435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:41 +0800 Subject: [PATCH 24/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20ex?= =?UTF-8?q?13=5F5=20=E5=85=AB=E7=9A=87=E5=90=8E=E9=97=AE=E9=A2=98.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7\345\220\216\351\227\256\351\242\230.txt" | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 "ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" diff --git "a/ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" "b/ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" deleted file mode 100644 index f984605..0000000 --- "a/ex13_5 \345\205\253\347\232\207\345\220\216\351\227\256\351\242\230.txt" +++ /dev/null @@ -1,29 +0,0 @@ -知识点:算法 - -Ex13.5 八皇后问题 - -在国际象棋的玩法中,皇后可以在横、纵、斜方向上,不受距离限制地吃掉直接遇到地任何棋子。 - -** 任务描述 ** - -请把八个皇后放到国际棋盘上,使任何两个皇后之间都不能吃到对方。 - -创建长度为8的pos[row_idx]列表,其中row_idx代表行标,pos[row_idx]代表在一行上的位置,也就是列标。 -例如:[5, 2, 0, 7, 4, 1, 3, 6] - -1. [初级难度] 编程验证一种解法是否正确 -2. [初级难度] 编程找出一种正确的解法 -3. [中级难度] 用海龟作图绘制出一种给定的解法 -4. [高级难度] 统计共有几种解法 - -** 提交方式 ** - -1. 将程序文件名保存为queens_.py,其中是你的名字。例如queens_cindy.py -2. 将程序提交(commit)到本地仓库 -3. 将这个提交推送(push)到你的码云仓库 -4. 创建一个Pull Request(PR)到 Moleqode/pratice 项目的exercise分支 - -** 提交截止时间 ** - -请于下周四(12/19)晚8点前提交你的作业。 -参考答案将在当晚8:30,在Moleqode/practice的master分支上发布。 \ No newline at end of file -- Gitee From 2c354b12fe57c69b7f7e4bd7a8520b4126be7fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 10:13:49 +0800 Subject: [PATCH 25/32] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20na?= =?UTF-8?q?mes.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- names.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 names.txt diff --git a/names.txt b/names.txt deleted file mode 100644 index 2caaf16..0000000 --- a/names.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Ex13.4 击鼓传花游戏 -# 在文件末尾另起一行,输入你的名字 -- Gitee From 73271eb10badc508700f110c0e98d3db62d19698 Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 1 Jan 2020 10:45:03 +0800 Subject: [PATCH 26/32] update --- emoji_ethan.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 emoji_ethan.py diff --git a/emoji_ethan.py b/emoji_ethan.py new file mode 100644 index 0000000..0e956c4 --- /dev/null +++ b/emoji_ethan.py @@ -0,0 +1,3 @@ +for c in range(0x2000, 0x33ff): + print(chr(c), end='') +#♔♕♖♗♘♙♚♛♜♝♞♟♠♡♢♣♤♥♦♧ \ No newline at end of file -- Gitee From a7d7f6bbe392a1ce2e2087cb595123c252513b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 16:50:30 +0800 Subject: [PATCH 27/32] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20chess=5Fflo?= =?UTF-8?q?or=5Fethan.py=20=E4=B8=BA=20chess=5Ffloor.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess_floor_ethan.py => chess_floor.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename chess_floor_ethan.py => chess_floor.py (100%) diff --git a/chess_floor_ethan.py b/chess_floor.py similarity index 100% rename from chess_floor_ethan.py rename to chess_floor.py -- Gitee From 493012ab9ac1c9e7e66ef445eca07ccf92869976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 16:50:40 +0800 Subject: [PATCH 28/32] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20decode=5Fet?= =?UTF-8?q?han.py=20=E4=B8=BA=20decode.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- decode_ethan.py => decode.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename decode_ethan.py => decode.py (100%) diff --git a/decode_ethan.py b/decode.py similarity index 100% rename from decode_ethan.py rename to decode.py -- Gitee From abed4417c4cf5ff7e2c0d9c05754ac660ce3628d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 16:50:49 +0800 Subject: [PATCH 29/32] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20emoji=5Feth?= =?UTF-8?q?an.py=20=E4=B8=BA=20emoji.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emoji_ethan.py => emoji.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename emoji_ethan.py => emoji.py (100%) diff --git a/emoji_ethan.py b/emoji.py similarity index 100% rename from emoji_ethan.py rename to emoji.py -- Gitee From c226137ef2b771a3d7e2b08bf20636ea1852c0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 17:25:18 +0800 Subject: [PATCH 30/32] update chess_floor.py. --- chess_floor.py => chess_floor_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename chess_floor.py => chess_floor_ethan.py (100%) diff --git a/chess_floor.py b/chess_floor_ethan.py similarity index 100% rename from chess_floor.py rename to chess_floor_ethan.py -- Gitee From 526477523d95f613286faa9dd47aa9ceee7f455f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 17:25:35 +0800 Subject: [PATCH 31/32] update decode.py. --- decode.py => decode_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename decode.py => decode_ethan.py (100%) diff --git a/decode.py b/decode_ethan.py similarity index 100% rename from decode.py rename to decode_ethan.py -- Gitee From 11ab90d161e767c7fd6faa70178bdadbed8ea3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=89=8CEdotM?= Date: Wed, 1 Jan 2020 17:25:52 +0800 Subject: [PATCH 32/32] update emoji.py. --- emoji.py => emoji_ethan.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename emoji.py => emoji_ethan.py (100%) diff --git a/emoji.py b/emoji_ethan.py similarity index 100% rename from emoji.py rename to emoji_ethan.py -- Gitee