Skip to content

Commit

Permalink
venancio mota e Otavio Cardoso
Browse files Browse the repository at this point in the history
  • Loading branch information
dojorio committed Mar 4, 2020
1 parent e73a14f commit cc6275b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 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 @@ -6,3 +6,4 @@ Qua Mar 4 20:29:56 BRT 2020 - Otavio Cardoso e Vinicius garcia
Qua Mar 4 20:35:39 BRT 2020 - venancio mota e Otavio Cardoso
Qua Mar 4 20:41:08 BRT 2020 - Vinicius garcia e venancio mota
Qua Mar 4 20:47:15 BRT 2020 - Otavio Cardoso e Vinicius garcia
Qua Mar 4 20:52:43 BRT 2020 - venancio mota e Otavio Cardoso
15 changes: 9 additions & 6 deletions 2020/20200304 - miojo - python/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ def miojo(temp_1, temp_2):
if temp_1 % 2 == 0 and temp_2 % 2 == 0:
return 'ampulhetas inválidas'

if temp_1 > temp_2:
return temp_1

if temp_1 == 6:
return 9

if temp_1 == 5:
if temp_2 == 7:
return 10

return 5
if temp_2 == 8:
return 8

if temp_1 == 2:
return temp_2

if temp_1 > temp_2:
return temp_1
return temp_2

return 3
6 changes: 5 additions & 1 deletion 2020/20200304 - miojo - python/test_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ def test_2_1(self):

def test_7_2(self):
self.assertEqual(miojo(7,2), 7)

def test_5_7(self):
self.assertEqual(miojo(5,7), 10)

def test_5_8(self):
self.assertEqual(miojo(5,8), 8)

def test_6_9(self):
self.assertEqual(miojo(6,9), 9)

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

0 comments on commit cc6275b

Please sign in to comment.