From 8d9da8f623141657e2fe69773a5f2a0408806261 Mon Sep 17 00:00:00 2001 From: Christian Bender Date: Sun, 19 Nov 2017 15:10:09 +0100 Subject: [PATCH] Correction: File solv01.py I have remove some semicolons. --- Project Euler/Problem 02/sol1.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Project Euler/Problem 02/sol1.py b/Project Euler/Problem 02/sol1.py index 6cf520767..065af1ebd 100644 --- a/Project Euler/Problem 02/sol1.py +++ b/Project Euler/Problem 02/sol1.py @@ -8,11 +8,13 @@ e.g. for n=10, we have {2,8}, sum is 10. ''' n = int(raw_input().strip()) -i=1; j=2; sum=0 +i=1 +j=2 +sum=0 while(j<=n): if((j&1)==0): #can also use (j%2==0) sum+=j temp=i i=j j=temp+i -print sum \ No newline at end of file +print sum