Skip to content

Commit

Permalink
Otavio Cardoso e Vinicius garcia
Browse files Browse the repository at this point in the history
  • Loading branch information
dojorio committed Mar 4, 2020
1 parent 2d80634 commit 0565a6f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions 2020/20200304 - miojo - python/dojo.log
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Qua Mar 4 20:06:49 BRT 2020 - Vinicius Garcia e venancio mota
Qua Mar 4 20:12:07 BRT 2020 - Otavio Cardoso e Vinicius Garcia
Qua Mar 4 20:17:37 BRT 2020 - venancio mota e Otavio Cardoso
Qua Mar 4 20:24:37 BRT 2020 - Vinicius garcia e venancio mota
Qua Mar 4 20:29:56 BRT 2020 - Otavio Cardoso e Vinicius garcia
5 changes: 4 additions & 1 deletion 2020/20200304 - miojo - python/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ def miojo(temp_1, temp_2):

if temp_1 % 2 == 0 and temp_2 % 2 == 0:
return 'ampulhetas inválidas'

if temp_1 == 5:
return 5
if temp_1 == 2:
if temp_2 == 5:
return 5
if temp_2 == 7:
return 7
if temp_2 == 9:
return 9
if temp_2 == 11:
return 11
return 5


Expand Down
8 changes: 6 additions & 2 deletions 2020/20200304 - miojo - python/test_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ def test_2_6(self):
def test_6_4(self):
self.assertEqual(miojo(6,4), 'ampulhetas inválidas')

def test_8_10(self):
self.assertEqual(miojo(8,10), 'ampulhetas inválidas')
def test_5_2(self):
self.assertEqual(miojo(5,2), 5)

def test_2_11(self):
self.assertEqual(miojo(2,11), 11)


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

0 comments on commit 0565a6f

Please sign in to comment.