Answer:
terms = int(input("Enter n? "))
n1 = 0
n2 = 1
count = 0
while count < terms:
nterm = n1 + n2
n1 = n2
n2 = nterm
count += 1
print(n1)
Step-by-step explanation:
This prompts user for n
terms = int(input("Enter n? "))
The next lines initialises the first two terms of the series
n1 = 0
n2 = 1
This initialises count to 0
count = 0
The following iteration is used to determine the number at the nth position
while count < terms:
nterm = n1 + n2
n1 = n2
n2 = nterm
count += 1
This prints the required number
print(n1)