forked from techgymjp/techgym_python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjT7d.py
39 lines (33 loc) · 838 Bytes
/
jT7d.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import random
data = [['見','貝'], ['土','士'], ['眠','眼']]
level = 1
def start_message():
print('違う漢字の番号(例:A1)を入力してください')
def section_message():
print('レベル:' + str(level))
def view_question():
choice_data = random.randint(0, 2)
mistake_number = random.randint(0, 8)
print('デバッグ:mistake_number = ' + str(mistake_number))
question = data[choice_data]
print(question)
i = 0
j = 0
while i < 3:
question_str = ''
while j < 3:
if (i * 3 + j) == mistake_number:
question_str += question[1]
else:
question_str += question[0]
j += 1
print(question_str)
i += 1
j = 0
def play():
section_message()
view_question()
choice = input('(例:A1)')
print('デバッグ:choice = ' + choice)
start_message()
play()