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
faltersainse [42]
3 years ago
15

The Fibonacci numbers are the numbers

Computers and Technology
1 answer:
Doss [256]3 years ago
6 0

Answer:

function fibonacci(n):

  if n is equal to 1 or n is equal to 2:

       return 1

  else:

       return fibonacci(n-1) + fibonacci(n-2)

end of the function

Input the n

Print fibonacci(n)

Explanation:

* The above algorithm (pseudocode) is written considering Python.

Create a function called fibonacci that takes one parameter, n

If n is equal to 1 or 2, return 1 (When n is 1 or 2, the fibonacci numbers are 1)

Otherwise, return the sum of the two previous numbers (When n is not 1 or 2, the fibonacci number is equal to sum of the two previous numbers)

Ask the user for n

Call the function, pass n as a parameter and print the result

You might be interested in
Describe a situation when you would use a conditional statement in a program. Describe the action that would occur when the cond
kramer

Answer:  Conditional statements are just true false statements

Explanation:

Let's say there's a kpop band burglarizing my house and I have a super AI that detects if a kpop band is my house through cameras. What it would do is change a variable "kpopBandInHouse = False" to True. I would then have an if statement next with a custom function:

if kpopBandInHouse == True:

   nukeHouse()

So if the conditional statement is true, it nukes my house. It is false, it does not nuke my house.

7 0
3 years ago
3. Encode these sentences in ASCII: a. "Stop!" Cheryl shouted. b. Does 2 + 3 = 5?​
Zepler [3.9K]

Answer:

"Stop!" Cheryl shouted.
34, 83, 116, 111, 112, 33, 34, 32, 67, 104, 101, 114, 121, 108, 32, 115, 104, 111, 117, 116, 101, 100, 46

Does 2 + 3 = 5?
68, 111, 101, 115, 32, 50, 32, 43, 32, 51, 32, 61, 32, 53, 63

I got these numbers with this python code:
print([ord(c) for c in '"Stop!" Cheryl shouted.'])
print([ord(c) for c in 'Does 2 + 3 = 5?'])

4 0
2 years ago
Two of the major sources used today for obtaining information to create computer maps are satellites and _____________.
nikdorinn [45]
The Global Positioning System or GPS.
7 0
3 years ago
Read 2 more answers
Technician A says in computer language a 0 or 1 is called a bit. Technician B says in computer language a 0 or 1 is called a byt
pochemuha

Answer:

Technician A is right 0 or 1 is called a bit

Explanation:

In computer language, Binary system is used in which data is shown either as 0 or 1.

A bit can hold either 0 or 1.

A byte can hold 8 bits of information.

Normally we use byte to represent computer storage.

A Kilo Byte (KB) can hold 1,024 bytes of information or 1,024*8 = 8,192 bits

A Mega Byte (MB) can hold 1,024*1,024 =1,048,576 bytes

or 1,048,576*8= 8,388,608 bits

Hence 0 or 1 is called a bit not byte therefore, Technician A is right!

8 0
3 years ago
Operating systems provide a measure of security by allowing users to access to those resources they've been cleared to use as we
Nikolay [14]

Answer:

True

Explanation:

5 0
4 years ago
Other questions:
  • Which of the following accurately completes this sentence? The Internet is ____.
    6·2 answers
  • When you start to type =av, what feature displays a list of functions and defined names?
    11·1 answer
  • Print 'userNum1 is negative" if userNum1 is less than 0. End with newline Convert userNum2 to 0 if userNum2 is greater than 9. O
    8·1 answer
  • (Financial application: compound value) Suppose you save $100 each month into a savings account with the annual interest rate 5%
    8·1 answer
  • The Mail Merge option is located in which tab? a;home b;insert c;refernces d;mailings
    11·2 answers
  • What is the purpose of a transistor?
    13·2 answers
  • Write a method that takes in a String and returns a new
    15·1 answer
  • HELPPP I cand find my sound card/driver on my computer, and I cant hear anything, I have tried to update the audio driver, but w
    7·1 answer
  • What are the main dimensions of information system and their components
    13·1 answer
  • Which JavaScript defense restricts a JavaScript downloaded from Site A from accessing data that came from Site B?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!