# exercise-05 Fibonacci sequence for first 50 terms

# Write the code that:
# 1. Calculates and prints the first 50 terms of the fibonacci sequence.
# 2. Print each term and number as follows:
#      term: 0 / number: 0
#      term: 1 / number: 1
#      term: 2 / number: 1
#      term: 3 / number: 2
#      term: 4 / number: 3
#      term: 5 / number: 5
#      etc.

# Hint: The next number is found by adding the two numbers before it
i = 0
previous1 = 0 
previous2 = 0
result = []

while (len(result) != 51 ):
    if (len(result) == 1):
        previous1 = 1
    result.append(previous1 + previous2)
    print(f'term: {i} / number: {result[i]}')
    previous1 = previous2
    previous2 = result[i]
    i+=1

