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
Novosadov [1.4K]
3 years ago
13

We will pass in a value N. Write a program that outputs the complete Fibonacci sequence for N iterations. Important: If N is 0,

then we expect to get an output of 0. If N=1 then we expect 0, 1 etc.
Computers and Technology
1 answer:
jasenka [17]3 years ago
3 0

Answer:

The program written in Python is as follows

def fibonac(N):

    series = ""

    for i in range(0,N+1):

         series = series + str(i) + ","

   return series[:-1]

N = int(input("Number: "))

print(fibonac(N))

Explanation:

This line defines the function fibonac

def fibonac(N):

This line initializes variable "series" to an empty string

    series = ""

This line iterates through the passed argument, N

    for i in range(0,N+1):

This line determines the Fibonacci sequence

         series = series + str(i) + ","

Lastly, this line returns the Fibonacci sequence

   return series[:-1]

The main starts here

The firs line prompts user for input

N = int(input("Number: "))

This line prints the Fibonacci sequence

print(fibonac(N))

You might be interested in
The operating system is not responsible for allowing one computer to share information with other computers.
kompoz [17]

The network layer is responsible for logical connection setup, data forwarding, routing & delivery. This therefore means that the network (third) layer of the OSI model is responsible for allowing one computer to share information with other computers.

3 0
3 years ago
Read 2 more answers
Case 1-1Tom has just started working as an intern for a local radio station. He is responsible for managing the request line and
pantera1 [17]

Answer:

The answer is Live Preview.

Explanation:

<em>Live Preview is a Powerpoint tool that helps the user to find out how a singular choice will change the appearance of the presentation, without committing any change. This application allows the user to edit any slide and see the changes without any risk of damaging the rest of the presentation.</em>

<em>It lets the user see how an actual change will look on the slide  object before the user decides to accept or decline the change.</em>

<em>It is a powerful resource, because we know how handful it is to prepare a powerpoint presentation.</em>

3 0
3 years ago
Write down the numbering system from base 2 to 200​
natka813 [3]

Answer:

So, 11001000 is the binary equivalent of decimal number 200 (Answer).

 

3 0
3 years ago
Which of the following best describes the difference between the domain and path of a URL?
Lana71 [14]

Answer:

the first choice

Explanation:

8 0
3 years ago
3. What are two reasons for versioning your still life project file? (1.0 points)
inna [77]

Answer:

The project file can be managed by making its multiple version due to the following reasons.

1. We can create multiple copies or version of the project to avoid any unfortunate circumstance such as Project file can be corrupted or can be deleted. In that case we can use the other version of that project file.

2. When we are working on some project, we are modifying the code or program to achieve our desired results. In this process we may forgot the changes that we have made while modification. If we does not obtain our desired results while modification that can lead to losing the original file. To reduce this type of risk we create multiple versions of project File.

3. We also create version of our project files on some internet drives as a backup. In case our computer has lost or operating system has been corrupted. A version of our project file is available on Internet drives such as Google drive or Drop box.

3 0
3 years ago
Other questions:
  • _____ are the supertiny on-off switches in a chip that work collectively to calculate or store things in memory. Transistors Mul
    10·1 answer
  • What is the Code of Conduct/Ethics for the company/of Department of Defense?
    7·1 answer
  • When someone refers to "space" on a computer or device, they are usually referring to _____, which allows the user to save a fil
    10·1 answer
  • Are one of the greatest features of Photoshop that allow nondestructive editing of images.
    6·1 answer
  • Create a view named Top10PaidInvoices that returns three columns for each vendor: VendorName, LastInvoice (the most recent invoi
    12·1 answer
  • Whois the person start programming​
    13·1 answer
  • Which of these are characteristics of a Python data type? Check all that apply.
    11·1 answer
  • AYUDAAA ESPARA HOYYY
    14·2 answers
  • given the variables temperature and humidity, write an expression that evaluates to true if and only if the temperature is great
    11·1 answer
  • Best practices and trends for technology integration
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!