diff --git a/src/Python/Problems001-050/Problem001.py b/src/Python/Problems001-050/Problem001.py index a3f9322..626a19b 100644 --- a/src/Python/Problems001-050/Problem001.py +++ b/src/Python/Problems001-050/Problem001.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python """ Created on 14 Mar 2017 @@ -20,11 +20,11 @@ def compute(): 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)) return ans if __name__ == "__main__": - - print(f"Result for problem 1: {compute()}") + print(f"Result for problem 1 is {compute()}")