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
Alex_Xolod [135]
4 years ago
10

Python: Write a program that asks the user how many Fibonnaci numbers to generate and then generates them.

Computers and Technology
1 answer:
Archy [21]4 years ago
7 0

Answer:

k (btw I kind of suck at python I use a lot of c++ but this is the best I can make up)

Explanation: def fibonacci():

   num = int(input("Please enter how many numbers would you like in your Fibonacci sequence: "))

   i = 1

   if num == 0:

       fib = []

   elif num == 1:

       fib = [1]

   elif num == 2:

       fib = [1,1]

   elif num > 2:

       fib = [1,1]

       while i < (num - 1):

           fib.append(fib[i] + fib[i-1])

           i += 1

   return fib

print (fibonacci())

input()

You might be interested in
What is the code for this please?​
elena55 [62]
What you mean code like a escape room I need more info
8 0
3 years ago
On the Visit screen, you will not see one of the following:
san4es73 [151]

Answer:

The answer is "Option b".

Explanation:

An access level denotes a set of data type permissions or restrictions, that reduces the access level, which is an effective way to reduce failure modes, debug time and system complexity. and other options are not correct, i.e. define as follows:

  • In option a, In some of the cases, the system provides security, which is responded by the server to check the Eligibility of user, that's why it is not correct.
  • In option c, The home address is always shown on the URL, that's why it is not correct.

8 0
4 years ago
When text is used as a Hyperlink, it is usually underlined and appears as a different color.
Artist 52 [7]
True it usually shows up with a blue underline
7 0
3 years ago
If your computer is running slowly, which of the following is most likely to solve the problem?
Rom4ik [11]
Rebooting the computer and calling the computer maunfactoring company will help. If not, you could go to a repair shop.
8 0
3 years ago
Read 2 more answers
Cell division is called:
Blizzard [7]

Answer:

Mitosis

Explanation:

6 0
3 years ago
Other questions:
  • Interpersonal skills are extremely important in production management. true or false
    10·1 answer
  • What does this say:<br> √ans
    6·2 answers
  • When would a one way flag variable be used
    10·1 answer
  • According to the video, what are some hazards Stationary Engineers may face? Check all that apply. noise, hazardous materials, d
    7·2 answers
  • Do most web queries have fully meets results
    11·1 answer
  • Write a JAVA program containing a method called hasEight(), which takes an int as input and returns true if the number contains
    14·1 answer
  • Daniel would like to send a letter to more than one hundred people. He should type each letter separately.
    12·1 answer
  • You are not sure if a certain word has an"e"at the end<br>​
    11·1 answer
  • Whats worth more in adopt me- A Mega Owl or a Mega Frost Dragon?
    8·2 answers
  • What is computer hardware / software​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!