質問編集履歴

2

コード内のif/elif文のインデントを修正しました

2020/05/03 02:08

投稿

pystudent
pystudent

スコア10

test CHANGED
File without changes
test CHANGED
@@ -128,23 +128,21 @@
128
128
 
129
129
 
130
130
 
131
- if record == "Y":
131
+ if record == "Y":
132
132
 
133
- anotherRecord = False
133
+ anotherRecord = False
134
134
 
135
135
 
136
136
 
137
- elif record == "N":
137
+ elif record == "N":
138
138
 
139
- anotherRecord = False
139
+ anotherRecord = False
140
140
 
141
- keepAsking = False
141
+ keepAsking = False
142
142
 
143
143
 
144
144
 
145
145
  print("END")
146
-
147
-
148
146
 
149
147
 
150
148
 

1

コード内のwhile文のインデントを修正しました

2020/05/03 02:07

投稿

pystudent
pystudent

スコア10

test CHANGED
File without changes
test CHANGED
@@ -112,37 +112,39 @@
112
112
 
113
113
  else:
114
114
 
115
- output = "Recorded as " + a + b + c + d
115
+ output = a + " (" + b + ") " + "has been recorded as " + c + d + "."
116
116
 
117
117
  print(output)
118
118
 
119
119
 
120
120
 
121
- anotherRecord = True
121
+ anotherRecord = True
122
122
 
123
- while anotherRecord:
123
+ while anotherRecord:
124
124
 
125
125
 
126
126
 
127
- record = input("Do you wish to enter another record? (Y/N) ")
127
+ record = input("Do you wish to enter another record? (Y/N) ")
128
128
 
129
129
 
130
130
 
131
- if record == "Y":
131
+ if record == "Y":
132
132
 
133
- anotherRecord = False
133
+ anotherRecord = False
134
134
 
135
135
 
136
136
 
137
- elif record == "N":
137
+ elif record == "N":
138
138
 
139
- anotherRecord = False
139
+ anotherRecord = False
140
140
 
141
- keepAsking = False
141
+ keepAsking = False
142
142
 
143
143
 
144
144
 
145
145
  print("END")
146
+
147
+
146
148
 
147
149
 
148
150