Algorithm Hacks
Welcome to my Fibonacci Sequence Algorithm
terms = int(input("How many terms do you need of the Fibonacci sequence?"))
# These two terms will be reused to print as many terms as needed
number = 0
digit = 1
# count will help me make sure that the selected number of terms will be printed
count = 0
# check if the input to "terms" is able to be used
if terms <= 0:
print("Please enter a positive integer")
else:
print(f"You selected {terms} terms.")
print(f"Fibonacci sequence from term 1 to term {terms}:")
while count < terms:
print(number)
placeholder = number + digit
number = digit
digit = placeholder
count += 1