+ 1
Fibonacci count to 200
# What does this code do? # Fibonacci code. huh? # print("Hello.") a = 0 b = 1 while a <= 21: b + a #internal expression before actual addition c = b + a # UHH EXCUSE ME I INDENTED THIS BECAUSE VARIABLE c ISN'T STACKING SO MAYBE IT SHOULD BE OUTSIDE OF THE WHILE LOOP print(c) if b > 21: b = b + a elif b == -1: -1 * 500 + 500 else: if b >= 200: "done"
1 Answer
+ 1
Not my code, just copied from python.org
a, b = 0, 1
while a < 200:
print(a, end=',')
a, b = b, a+b