From cb3381a0f6e5da982b7448a1fd5c64e0cb129535 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Wed, 21 Sep 2022 20:43:38 +0200 Subject: [PATCH] Adopted new convention from template --- src/Python/Problems001-050/Problem001.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()}")