# File: fib.py
# compute and print the first few Fibonacci numbers
#
# Matt Bishop, ECS 10, Fall 2012
#
#
# read in the number to go to
#
try:
count = int(input("How many Fibonacci numbers should I show? "))
except:
print("Please enter a positive number greater than 1!")
else:
# initialize series
fn1 = 0
fn2 = 1
print("Fibonacci number 1 is", fn1)
print("Fibonnaci number 2 is", fn2)
# compute the sequence and print the terms
for i in range(count-2):
# get next Fibonacci number
fn = fn1 + fn2
# announce it
print ("Fibonacci number", i+3, "is", fn)
# advance in seuence
fn1 = fn2
fn2 = fn