6- Ask the user for a number n which is then used to find the Fibonacci sequence up to n. Write a python function named Fibonacci that calculates the Fibonacci sequence. startNumber = int(raw_input("Enter the start number here ")) endNumber = int(raw_input("Enter the end number here"))
Thanks for the question, here is the code which accepts the startnumber and end number from user and prints all the fibonacci numbers between the start and end numbers
Here is the code with sample output !
thanks and let me know for any changes or help !!
====================================================================================
startNumber = int(input("Enter the start number here: "))
endNumber = int(input("Enter the end number here: "))
n1 = 0
n2 = 1
next_num=n1
# until the fibonacci number is less than the end number
while next_num<=endNumber:
# print only if the fibonacci number is greater than the startnumber
if next_num>=startNumber:
print(next_num,end=' ')
# update to the next set of numbers
next_num=n1+n2
n1=n2
n2=next_num
==================================================================================

6- Ask the user for a number n which is then used to find the Fibonacci...