質問編集履歴

1

スペースの表示

2020/06/08 08:13

投稿

ryusei05
ryusei05

スコア1

test CHANGED
File without changes
test CHANGED
@@ -12,75 +12,75 @@
12
12
 
13
13
  def hangman(word):
14
14
 
15
- wrong = 0
15
+ ,,,,wrong = 0
16
16
 
17
- stages = ["",
17
+ ,,,,stages = ["",
18
18
 
19
- "__________ ",
19
+ ,,,,,,,,,,,,"__________ ",
20
20
 
21
- "| ",
21
+ ,,,,,,,,,,,,"| ",
22
22
 
23
- "| | ",
23
+ ,,,,,,,,,,,,"| | ",
24
24
 
25
- "| O ",
25
+ ,,,,,,,,,,,,"| O ",
26
26
 
27
- "| /|\ ",
27
+ ,,,,,,,,,,,,"| /|\ ",
28
28
 
29
- "| / \ ",
29
+ ,,,,,,,,,,,,"| / \ ",
30
30
 
31
- "| ",
31
+ ,,,,,,,,,,,,"| ",
32
32
 
33
- ]
33
+ ,,,,,,,,,,,,]
34
34
 
35
- rletters = list(word)
35
+ ,,,,rletters = list(word)
36
36
 
37
- board = ["_"] * len(word)
37
+ ,,,,board = ["_"] * len(word)
38
38
 
39
- win = False
39
+ ,,,,win = False
40
40
 
41
- print("ハングマンへようこそ")
41
+ ,,,,print("ハングマンへようこそ")
42
42
 
43
- while wrong < len(stages) - 1:
43
+ ,,,,while wrong < len(stages) - 1:
44
44
 
45
- print("\n")
45
+ ,,,,,,,,print("\n")
46
46
 
47
- msg = "1文字を予想してね"
47
+ ,,,,,,,,msg = "1文字を予想してね"
48
48
 
49
- char = input(msg)
49
+ ,,,,,,,,char = input(msg)
50
50
 
51
- if char in rletters:
51
+ ,,,,if char in rletters:
52
52
 
53
- cind = rletters.index(char)
53
+ ,,,,,,,,cind = rletters.index(char)
54
54
 
55
- board[cind] = char
55
+ ,,,,,,,,board[cind] = char
56
56
 
57
- rletters[cind] = '$'
57
+ ,,,,,,,,rletters[cind] = '$'
58
58
 
59
- else:
59
+ ,,,,else:
60
60
 
61
- wrong += 1
61
+ ,,,,,,,,wrong += 1
62
62
 
63
- print(" ".join(board))
63
+ ,,,,print(" ".join(board))
64
64
 
65
- e = wrong + 1
65
+ ,,,,e = wrong + 1
66
66
 
67
- print("\n".join(stages[0:e]))
67
+ ,,,,print("\n".join(stages[0:e]))
68
68
 
69
- if "_" not in board:
69
+ ,,,,if "_" not in board:
70
70
 
71
- print("あなたの勝ち!")
71
+ ,,,,,,,,print("あなたの勝ち!")
72
72
 
73
- print(" ".join(board))
73
+ ,,,,,,,,print(" ".join(board))
74
74
 
75
- win = True
75
+ ,,,,,,,,win = True
76
76
 
77
- break
77
+ ,,,,,,,,break
78
78
 
79
- if not win:
79
+ ,,,,if not win:
80
80
 
81
- print("\n".joint(stages[0:wrong+1]))
81
+ ,,,,,,,,,,,,print("\n".joint(stages[0:wrong+1]))
82
82
 
83
- print("あなたの負け!正解は{}.".format(word))
83
+ ,,,,,,,,,,,,print("あなたの負け!正解は{}.".format(word))
84
84
 
85
85
 
86
86