1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IRISSAK [1]
3 years ago
12

The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, .. . . Each number in the se-quence (after the first two) is the sum of the prev

ious two. Write a pro-gram that computes and outputs the nth Fibonacci number, where n is avalue entered by the user.
Computers and Technology
1 answer:
dem82 [27]3 years ago
5 0

Answer:

value=int(input("Enter the number up-to the user wants the Fibonacci series: "))

a=0

b=1

c=1

for x in range(value):

   print(c,end=" ")

   c=a+b

   a=b

   b=c

Output :

  • If the user input 5, then the output is "1 1 2 3 5".
  • If the user input 10, then the output is "1 1 2 3 5 8 13 21 34 55".

Explanation:

  • The above defined a python program which is used for the Fibonacci series.
  • The first line of the program is used to instruct the user and take the input from the user.
  • Then the for loop executes up-to that range value.
  • Then in the for-loop, the two variable needs to store the current value and previous value which is used to give the series after addition.
You might be interested in
The user documents are stored in _______ format.
BartSMP [9]

The user documents are stored in _______ format.

A. qvd.

B.  qvw

C.  None of the options

D.  qvs.

Answer:

B.  qvw

Explanation:

Given the options available, it can be inferred that the application the question is referring to is called QlikView which is a software application that is used for analytics explanation. This software applications saves documents created in a file extension specifically known as "QVW."

Hence, the right answer is that: in QlikView, the user documents are stored in QVW format.

8 0
3 years ago
Application software (apps) includes all the programs that allow you to perform specific tasks or applications on a computer. In
bulgar [2K]

Answer:

Microsoft Excel / Spreadsheet software.

5 0
4 years ago
Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This
lutik1710 [3]
I’m confused what are you asking
7 0
3 years ago
Which of the following statements about federal student loans is true?
never [62]
The correct answer is a.<span>) the interest rate on your loan will be fixed over time. 
</span>
7 0
4 years ago
Why did it take hundreds
levacccp [35]
Before that there was no way for the image to be recorded and fixed on a surface
5 0
3 years ago
Other questions:
  • A misfire code is a type _______ diagnostic trouble code (DTC).
    5·1 answer
  • A(n) ____ is a user interface that allows users to interact with graphical objects and pointing devices.
    13·1 answer
  • When you park on a hill, think about which way _____.
    6·2 answers
  • Which of the following means to find and fix errors in code?Which of the following means to find and fix errors in code?
    5·1 answer
  • What is the main purpose of a graphic organizer?
    10·2 answers
  • What is "the last mile of broadband access"? Why is this a problem and what kind of impact does it have on the business world an
    9·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    14·2 answers
  • Select the correct answer.
    10·1 answer
  • Example of Not a computer characteristics example
    12·1 answer
  • to protect a windows 10 system, you've configured system restore to automatically protect your system using restore points. will
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!