Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05e2ab5

Browse files
committed
Tweaks to chapter
1 parent10c1fc9 commit05e2ab5

File tree

1 file changed

+34
-16
lines changed

1 file changed

+34
-16
lines changed

‎core/chapters/c11_tic_tac_toe_project.py‎

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,52 @@ class intro_row_winner(ExerciseStep):
5151
You will develop a text-based interactive tic-tac-toe game to be played by 2 human players.
5252
Here is a small preview of what the finished game will look like in play:
5353
54-
123
54+
1 2 3
55+
1 | |
56+
-+-+-
57+
2 | |
58+
-+-+-
59+
3 | |
60+
61+
X to play:
62+
1
5563
1
64+
65+
1 2 3
66+
1 X| |
67+
-+-+-
68+
2 | |
69+
-+-+-
70+
3 | |
71+
72+
O to play:
73+
2
5674
2
57-
3
5875
59-
X to play
60-
Enter row: 2
61-
Enter column: 2
62-
123
76+
1 2 3
77+
1 X| |
78+
-+-+-
79+
2 |O|
80+
-+-+-
81+
3 | |
82+
83+
X to play:
6384
1
64-
2 X
6585
3
6686
67-
O to play
68-
Enter row: 1
69-
Enter column: 3
70-
123
71-
1 O
72-
2 X
73-
3
87+
1 2 3
88+
1 X| |X
89+
-+-+-
90+
2 |O|
91+
-+-+-
92+
3 | |
7493
7594
We will break up the project into several small functions, which will be exercises.
7695
7796
You will use many of the concepts you have learned so far: strings,
7897
nested lists, nested loops, `range`, calling functions within functions, comparisons, and booleans.
7998
80-
Along the way you will also learn some new concepts: `input`, the newlinecharacter, types in Python, and `while` loops.
99+
Along the way you will also learn some new concepts, including newlinecharacters, types, and `input()`.
81100
82101
Here is a rough outline of the project:
83102
@@ -592,7 +611,6 @@ def generate_inputs(cls):
592611
Great work!
593612
594613
Now we have the code to determine a winning state on the board.
595-
Next we will tackle the problem of displaying the board on the screen.
596614
"""
597615

598616

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp