# fibonacci_sequence.py
# This program computes the nth Fibonacci number where n is a value input
# by the user.
# by: Scott Gordon
def main():
print("***** Welcome to the Fibonacci Sequencer *****\n")
n = int(input("Enter the value of n: "))
curr, prev = 1, 1
for i in range(n-2):
curr, prev = curr+prev, curr
print("The nth Fibonacci number is", curr)
if __name__ == '__main__':
main()
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)