summaryrefslogtreecommitdiff
path: root/Problem1.py
diff options
context:
space:
mode:
Diffstat (limited to 'Problem1.py')
-rw-r--r--Problem1.py18
1 files changed, 18 insertions, 0 deletions
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