PY
py
1
2
3
4
5
6
7
8
9
10
x, y = 1, 0 # Assigns starting numbers
for i in range(100): # Generates 100 numbers
print(x + y) # Number in sequence = previous 2 added together
x, y = x + y, x # Assigns numbers accordingly
# Efficient way to calculate 100 numbers of Fibonacci Sequence in
# 4 lines, 2 variables (v2)
# Uses multi-variable assigning to assign multiple variables on one line (similar to tuple unpacking)
#
# By Henry Riser
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run