回答編集履歴

3

修正

2018/08/16 07:51

投稿

liveasnotes
liveasnotes

スコア1284

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- あと,こういう書き方もあります
7
+ あと,こういう書き方もあります(fizzmodとbuzzmodが互いに素である場合)
8
8
 
9
9
 
10
10
 

2

語尾修正

2018/08/16 07:51

投稿

liveasnotes
liveasnotes

スコア1284

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- あと,こういう書き方もあります
7
+ あと,こういう書き方もあります
8
8
 
9
9
 
10
10
 

1

追記

2018/08/16 07:33

投稿

liveasnotes
liveasnotes

スコア1284

test CHANGED
@@ -1 +1,33 @@
1
+ 動きますね
2
+
1
3
  ![イメージ説明](89681c802f942590b29f26b435c262f6.gif)
4
+
5
+
6
+
7
+ あと,こういう書き方もありますね
8
+
9
+
10
+
11
+ ```python
12
+
13
+ def fizzbuzz(count=100,fizzmod=3,buzzmod=5):
14
+
15
+ for cnt in range(1,count+1):
16
+
17
+ if cnt%(fizzmod*buzzmod) == 0: #MODIFIED
18
+
19
+ print("FizzBuzz")
20
+
21
+ elif cnt%fizzmod==0:
22
+
23
+ print("Fizz")
24
+
25
+ elif cnt%buzzmod==0:
26
+
27
+ print("Buzz")
28
+
29
+ else:
30
+
31
+ print(cnt)
32
+
33
+ ```