質問編集履歴
1
課題文と、かいたコードの実行結果を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,6 +7,32 @@
|
|
7
7
|
下記にコードを載せておきます。
|
8
8
|
|
9
9
|
よろしくお願いいたします。
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
**※要求されているコードを載せ忘れていたため追記します。
|
18
|
+
|
19
|
+
提示された課題の内容**
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
Add a line to your loop before your print statement. Use the next keyword so that you skip to the next iteration if the number i is odd.
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
Use the example above for help, but remember that the example above skips even numbers.
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
ここまで
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
10
36
|
|
11
37
|
|
12
38
|
|
@@ -44,6 +70,20 @@
|
|
44
70
|
|
45
71
|
|
46
72
|
|
73
|
+
実行結果
|
74
|
+
|
75
|
+
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
これを実行すると、191715131197531-1nil
|
80
|
+
|
81
|
+
このように偶数が飛んで表示されます。
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
47
87
|
###試したこと
|
48
88
|
|
49
89
|
課題に対してアプローチしたことを記載してください
|