Adopted new convention from template
This commit is contained in:
parent
10981540ae
commit
cb3381a0f6
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
Created on 14 Mar 2017
|
Created on 14 Mar 2017
|
||||||
|
|
||||||
@ -20,11 +20,11 @@ def compute():
|
|||||||
|
|
||||||
Find the sum of all the multiples of 3 or 5 below 1000.
|
Find the sum of all the multiples of 3 or 5 below 1000.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ans = sum(x for x in range(1000) if (x % 3 == 0 or x % 5 == 0))
|
ans = sum(x for x in range(1000) if (x % 3 == 0 or x % 5 == 0))
|
||||||
|
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
print(f"Result for problem 1 is {compute()}")
|
||||||
print(f"Result for problem 1: {compute()}")
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user