From 0565a6f8de0d30f0a772d413f9530e32165df69a Mon Sep 17 00:00:00 2001 From: dojorio Date: Wed, 4 Mar 2020 20:29:56 -0300 Subject: [PATCH] Otavio Cardoso e Vinicius garcia --- 2020/20200304 - miojo - python/dojo.log | 1 + 2020/20200304 - miojo - python/problem.py | 5 ++++- 2020/20200304 - miojo - python/test_problem.py | 8 ++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/2020/20200304 - miojo - python/dojo.log b/2020/20200304 - miojo - python/dojo.log index 49b64d13..3c88e66b 100644 --- a/2020/20200304 - miojo - python/dojo.log +++ b/2020/20200304 - miojo - python/dojo.log @@ -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 diff --git a/2020/20200304 - miojo - python/problem.py b/2020/20200304 - miojo - python/problem.py index 598faec8..79da47a0 100755 --- a/2020/20200304 - miojo - python/problem.py +++ b/2020/20200304 - miojo - python/problem.py @@ -5,7 +5,8 @@ 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 @@ -13,6 +14,8 @@ def miojo(temp_1, temp_2): return 7 if temp_2 == 9: return 9 + if temp_2 == 11: + return 11 return 5 diff --git a/2020/20200304 - miojo - python/test_problem.py b/2020/20200304 - miojo - python/test_problem.py index 90e548b3..9905da16 100755 --- a/2020/20200304 - miojo - python/test_problem.py +++ b/2020/20200304 - miojo - python/test_problem.py @@ -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()