回答編集履歴
1
追加説明
test
CHANGED
@@ -1,3 +1,23 @@
|
|
1
1
|
Atomの方は分かりませんが、プログラムはきちんと動きました。
|
2
2
|
|
3
3
|
おそらく最初の入力で数字以外を入力しているか、2回目の入力で数字を入力しているかだと思います。
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
追記:
|
8
|
+
|
9
|
+
プログラムの説明
|
10
|
+
|
11
|
+
count=int(input()) ... 入力(input)をint型に変換してcountで受け取る
|
12
|
+
|
13
|
+
print("data num " + str(count)) ... countをstr型に変換して出力する。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
for range(count): ... count回繰り返す
|
18
|
+
|
19
|
+
line = input().rstrip() ... 入力(input)を受け取り、最後の空文字を削除(rstrip)、そしてlineに代入
|
20
|
+
|
21
|
+
print("hello: "+ line) ... lineを出力
|
22
|
+
|
23
|
+
|