Skip to content

Instantly share code, notes, and snippets.

@hsaito
Created Mar 25, 2018
Embed
What would you like to do?
import unittest
def multiple3_5(high:int) -> int:
sum = 0
for i in range (1, high):
if i % 3 == 0:
sum += i
elif i % 5 == 0:
sum += i
return sum
class TestProblem1(unittest.TestCase):
def test_example(self):
self.assertTrue(multiple3_5(10),23)
def test_answer(self):
print("Answer: "+str(multiple3_5(1000)))
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment