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
Ne4ueva [31]
2 years ago
13

Can someone please give me the 3.6 code practice answer I will mark you brainlyist

Computers and Technology
1 answer:
Stolb23 [73]2 years ago
3 0

3.6 Code Practice Question:

Write a program to input 6 numbers. After each number is input, print the biggest of the number entered so far:

Answer:

nums = []

biggest = 0

for i in range(6):

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

    nums.append(num)

    if(i == 0):

         print("Largest: "+str(nums[0]))

         biggest = nums[0]

    else:

         if nums[i]>biggest:

              print("Largest: "+str(nums[i]))

              biggest = nums[i]

         else:

              print("Largest: "+str(biggest))

                       

Explanation:

This question is answered using python

This line declares an empty list

nums = []

This line initalizes the biggest input to 0

biggest = 0

This iteration is perfoemed for 6 inputs

for i in range(6):

This prompts user for input

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

This appends user input to the list created

    nums.append(num)

For the first input, the program prints the first input as the largest. This is implemented in the following if condition

<em>     if(i == 0):</em>

<em>          print("Largest: "+str(nums[0]))</em>

<em>          biggest = nums[0]</em>

For subsequent inputs

    else:

This checks for the largest input and prints the largest input so far

<em>          if nums[i]>biggest:</em>

<em>               print("Largest: "+str(nums[i]))</em>

<em>               biggest = nums[i]</em>

<em>          else:</em>

<em>               print("Largest: "+str(biggest))</em>

<em />

You might be interested in
Compare Fibonacci (recursion vs. bottom up)
ipn [44]

Answer:

C++ code explained below

Explanation:

#include<bits/stdc++.h>

#include <iostream>

using namespace std;

int FiboNR(int n)

{

int max=n+1;

int F[max];

F[0]=0;F[1]=1;

for(int i=2;i<=n;i++)

{

F[i]=F[i-1]+F[i-2];

}

return (F[n]);

}

int FiboR(int n)

{

if(n==0||n==1)

return n;

else

return (FiboR(n-1)+FiboR(n-2));

}

int main()

{

long long int i,f;

double t1,t2;

int n[]={1,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75};

cout<<"Fibonacci time analysis ( recursive vs. non-recursive "<<endl;

cout<<"Integer FiboR(seconds) FiboNR(seconds) Fibo-value"<<endl;

for(i=0;i<16;i++)

{

clock_t begin = clock();

f=FiboR(n[i]);

clock_t end = clock();

t1=double(end-begin); // elapsed time in milli secons

begin = clock();

f=FiboNR(n[i]);

end = clock();

t2=double(end-begin);

cout<<n[i]<<" "<<t1*1.0/CLOCKS_PER_SEC <<" "<<t2*1.0/CLOCKS_PER_SEC <<" "<<f<<endl; //elapsed time in seconds

}

return 0;

}

7 0
2 years ago
What is the primary purpose of endnotes?
mihalych1998 [28]

Answer:

They acknowledge the source of a quotation, paraphrase, or summary; and (2) They provide explanatory comments that would interrupt the flow of the main text.so its B

5 0
2 years ago
Read 2 more answers
During data declaration, a name is binded to a memory location, what else can be identify as part of this process?
igomit [66]

data declaration means a variable which contain data value and it can be declared as integer, float, character, double, boolean (data types).

example:

int r;

char name;

float g;

double k= 23.34;

5 0
3 years ago
Which network could NOT carry commercial traffic?
sattari [20]

ARPANET would not carry it

4 0
2 years ago
Which of the statements below is true?
emmainna [20.7K]

The given statement that is true is; B: The Formatting, Standard, and Drawing toolbars are displayed.

<h3>Which statement is true of microsoft word?</h3>

In Microsoft word, there are different toolbars that are useful in operation. Now, from the given image from Microsoft word, we can see that toolbar is clicked. However in the fly-down from it, we see that the standard, formatting and drawing toolbars are ticked and as such they are the ones displayed.

Looking at the options, the correct one is Option B because it tells us that Formatting, Standard, and Drawing toolbars are displayed.

Read more about a true statement at; brainly.com/question/25605883

8 0
2 years ago
Other questions:
  • The Internet has made it possible for most people to order all of their clothing online. While this may be a preference for some
    5·1 answer
  • All animations on the world wide web are flash animations
    11·2 answers
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • What enables a website to recognize a computer as a return visitor (as opposed to a first-time visitor)?
    12·1 answer
  • A user prefers an external monitor, mouse, and keyboard for a laptop. The user does not want to use the built-in screen; however
    5·1 answer
  • Pls help will give brainlest​
    15·2 answers
  • Solve(-8/3)+7/5 please answer​
    5·1 answer
  • How can i fix a all white phone screen
    11·2 answers
  • Paul wants to store addresses and phone numbers for clients. Paul wants to use this information to send form letters. Paul shoul
    5·1 answer
  • How to add a legend to a graph in excel?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!