Cleaned up two tests.

This commit is contained in:
Tommaso Thea Cioni committed 2019-08-22 03:11:51 +02:00
1 parent a48df9d16a
commit d7187d426c
2 files changed
+3 -8

No files matched your search

-3
View File
@@ -1,11 +1,8 @@
j = 0
while j < 1000:
total = 0
i = 0
while i < 100:
total += i
i += 1
# print(total)
j += 1
+3 -5
View File
@@ -1,17 +1,15 @@
def fib(n):
# a, b = 1, 1
a = 1
b = 1
for _ in range(n-1):
for _ in range(n - 1):
temp = b
b = a+b
b = a + b
a = temp
#a, b = b, a+b
return b
print(fib(1))
print(fib(2))
print(fib(3))
print(fib(4))
print(fib(5))
print(fib(5))