Question: Question 4: Simple Programming Problems using Python Note: maximum award of 5 marks. The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, . .

Question 4: Simple Programming Problems using Python

Note: maximum award of 5 marks.

The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, . . . . Each number in the sequence (after the first two) is the sum of the previous two. Write a program that calculates and outputs the nthFibonnacci number, where n is a value entered by a user.

Do the following to document your work:

  • Name your program file using your college ID number, followed by the question number and then your firstname, separated by a dash. Example: 123456_Q4_Talal.py
  • Show your code, with appropriate comments
  • At least two screenshots of the outputs, each of which with a different value for nandwith appropriate labels and a short explanation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!