Skip to content

Commit

Permalink
Vinicius Garcia e venancio mota
Browse files Browse the repository at this point in the history
  • Loading branch information
dojorio committed Mar 4, 2020
1 parent a83486c commit 57987cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions 2020/20200304 - fizzbuzz - python/dojo.log
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Qua Mar 4 19:08:46 BRT 2020 - venancio mota e Otavio Cardoso
Qua Mar 4 19:14:55 BRT 2020 - Vinicius Garcia e venancio mota
Qua Mar 4 19:20:19 BRT 2020 - Otavio Cardoso e Vinicius Garcia
Qua Mar 4 19:25:40 BRT 2020 - venancio mota e Otavio Cardoso
Qua Mar 4 19:33:34 BRT 2020 - Vinicius Garcia e venancio mota
10 changes: 6 additions & 4 deletions 2020/20200304 - fizzbuzz - python/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
def fizzbuzz(num):
if num % 3 == 0:
return 'fizz'
if num == 5:
if num % 5 == 0:
return 'buzz'
if num == 2:
return 2
if num != % 3 or % 4 == 0:
return num
if num == 4:
return 4
if num == 7:
return 7
if num == 8:
return 8

if num == 11:
return 11

return 1
6 changes: 6 additions & 0 deletions 2020/20200304 - fizzbuzz - python/test_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def test_8(self):
def test_9(self):
self.assertEqual(fizzbuzz(9), 'fizz')

def test_10(self):
self.assertEqual(fizzbuzz(10), 'buzz')

def test_11(self):
self.assertEqual(fizzbuzz(11), 11)

if __name__ == "__main__":
unittest.main()

0 comments on commit 57987cd

Please sign in to comment.