aboutsummaryrefslogtreecommitdiff
path: root/python/001-multiples35.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/001-multiples35.py')
-rw-r--r--python/001-multiples35.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/001-multiples35.py b/python/001-multiples35.py
new file mode 100644
index 0000000..6a92369
--- /dev/null
+++ b/python/001-multiples35.py
@@ -0,0 +1,9 @@
+# -*- coding:utf-8 -*-
+
+sum35 = 0
+i = 0
+while i < 1000:
+ if i % 3 == 0 or i % 5 == 0:
+ sum35 += i
+ i += 1
+print(sum35)