From 1161f9a034de06a63538e3a9a0b7717098c744d9 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Fri, 7 Apr 2023 08:13:49 -0500 Subject: Initial Commit --- Problem1.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Problem1.py (limited to 'Problem1.py') diff --git a/Problem1.py b/Problem1.py new file mode 100644 index 0000000..f3ccb78 --- /dev/null +++ b/Problem1.py @@ -0,0 +1,18 @@ +# a, b = 0, 1 +# while a < 10: +# print(a) +# a, b = b, a+b +#print(sum(range(8))) + +def isMultiple(n): + if (n % 3 == 0) or (n % 5 == 0): + return True + else: + return False +count = 0 +for n in range(0,1000): + if isMultiple(n): + count = count + n +print(count) + + \ No newline at end of file -- cgit v1.2.3