I'm trying to make a fibonacci number generator that stops at a given amount, but it usually goes past the amount. What am I doing wrong?
#Fibonacci number generator
a=0
b=1
print("Fibonacci number generator.")
stopNumber=input("How high do you want to go? If you want to go forever, put n.")
print(1)
while stopNumber=="n":
a=a+b
b=b+a
print(a)
print(b)
else:
while int(stopNumber) > a or int(stopNumber) > b:
a=a+b
b=b+a
print(a)
print(b)