summaryrefslogtreecommitdiff
path: root/Problem2.py
diff options
context:
space:
mode:
authorJoshua Drake <joshua.drake@ditchwitch.com>2023-04-07 08:13:49 -0500
committerJoshua Drake <joshua.drake@ditchwitch.com>2023-04-07 08:13:49 -0500
commit1161f9a034de06a63538e3a9a0b7717098c744d9 (patch)
tree55bb842b2daa4f096eb7916a8d3630426fc1c376 /Problem2.py
Initial CommitHEADmaster
Diffstat (limited to 'Problem2.py')
-rw-r--r--Problem2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Problem2.py b/Problem2.py
new file mode 100644
index 0000000..6dd8f67
--- /dev/null
+++ b/Problem2.py
@@ -0,0 +1,10 @@
+a, b = 1, 2
+sum = 0
+while a < 4000000:
+ print(a)
+ if a % 2 == 0:
+ sum = sum + a
+ a, b = b, a+b
+print(sum)
+
+