diff options
author | mjf <mjf@localhost.localdomain> | 2020-02-04 12:11:30 -0500 |
---|---|---|
committer | mjf <mjf@localhost.localdomain> | 2020-02-04 12:11:30 -0500 |
commit | 6aa02212cd6dfbb492fa1f70b60a4fe3d48892e5 (patch) | |
tree | 1b655714c9709ee8fce333fcb6a6be3f5533b2d3 /fib.py.orig | |
parent | 8e431d287c0e89041506da4c4da57e3e3d657d72 (diff) | |
download | Project_Euler_Solutions-6aa02212cd6dfbb492fa1f70b60a4fe3d48892e5.tar.gz |
cleanup and added more c examples:
Diffstat (limited to 'fib.py.orig')
-rw-r--r-- | fib.py.orig | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/fib.py.orig b/fib.py.orig deleted file mode 100644 index 77b32fa..0000000 --- a/fib.py.orig +++ /dev/null @@ -1,33 +0,0 @@ -import PIL, math -MAX = 4*10**6 - -#Problem 2 Even Fibonnacci numbers -fib = [1, 1] - -k=1; -while (True): - n = fib[k] + fib[k-1] - if(n>MAX): - break - else: - fib.append(n); - k+=1 - -c=0 -for i in fib: - num = str(i) - print(num + " ", end='') - c+=1 - if(c%10==0): - print() - -print() - -print("The sum is: " + str(sum(fib))) - -s=0 -for i in fib: - if (i%2==0): - s+=i - -print("The sum of the even terms is: " + str(s)) |