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
Leya [2.2K]
2 years ago
11

A bug collector collects bugs every day for seven days. Write a program in Python that finds the highest number of bugs collecte

d over a course of seven days. The program should ask for the number of bugs collected each day, and when the loop is finished, the program should display the highest number of bugs collected in the week. Your output will look something like this:

Computers and Technology
1 answer:
Mama L [17]2 years ago
5 0

Answer:

mylist = [ ]

for i in range(7):

   mylist.append (int(input("Enter the number of bugs for each day ")))

print(mylist)

print("The highest number of bugs is ")

print(max((mylist)))

Explanation:

  1. Create and Initialize an empty (mylist)
  2. Using the .append method, we request and add the bugs for each day into the list
  3. print out the list
  4. Use the max function to find the highest number of bugs in the list and print it out

You might be interested in
Who is the three president of somalia​
Snezhnost [94]

Answer:

Siad Barre

Explanation:

3 0
3 years ago
Read 2 more answers
Analyze the following code (in both cases number has been declared and initialized): Code 1: boolean even; if (number % 2 == 0)
shusha [124]

Answer:

Both codes are correct.The value of even is true when the number is even.

Explanation:

Code 1:

number %2 ==0 means that when dividing number by 2 is the remainder coming out is zero.If it is true then even becomes is true if it is false then else statement is executes in which even becomes false.Means the number is odd.This code is simple and easy to understand.

Code 2:-

This code is a bit tricky and takes time to understand.even becomes true

when the number is divisible by 0 and false when it is not.

8 0
3 years ago
What is a protocol in digital technology plwwes help
anzhelika [568]

Protocol, in computer science, a set of rules or procedures for transmitting data between electronic devices, such as computers. In order for computers to exchange information, there must be a preexisting agreement as to how the information will be structured and how each side will send and receive it.

3 0
2 years ago
So i need help. my high-school class is using this computer programming site, i have no clue whats going on. anyone use CMU? ill
natali 33 [55]

Answer:

i am in middle school but i know what u mean. it i computer Sciene. dont worry. it i not hard. they might give you intruction on what to do So it wont be So hard. UwU. i belive in u

Explanation:

3 0
2 years ago
Ask the user how many high scores they want.
Alex

Answer:

Check the explanation

Explanation:

As per requirement submitted above kindly find below solution.

Here new console application in C# is created using visual studio 2019 with name "HighScoreApp". This application contains a class with name "Program.cs".Below is the details of this class.

Program.cs :

//namespace

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

//application namespace

namespace HighScoreApp

{

class Program //C# class

{

//entry point of the program , Main() method

static void Main(string[] args)

{

//declaring variable to store number of score

int numberOfScores = 0;

//using while loop

while(numberOfScores<=0)

{

//asking user number of high scores

Console.WriteLine("Enter number of high scores : ");

//reading input

numberOfScores = int.Parse(Console.ReadLine());

}

//declaring array with number of scores

int[] scores = new int[numberOfScores];

//asking user high scores using for loop

for (int i = 0; i < scores.Length; i++)

{

//asking high scores

Console.WriteLine("Enter score "+(i+1)+" : ");

//reading score

scores[i] = int.Parse(Console.ReadLine());

}

Console.WriteLine();//used for new line

Console.WriteLine("High Scores -Unsorted");

//call function to print each element

PrintArray(scores);

//call method to sort the array elements

scores = SortArrayHighToLow(scores);

Console.WriteLine();//used to print new line

Console.WriteLine("High Scores-Sorted");

PrintArray(scores);//call method to print array elements

Console.SetCursorPosition(0, Console.WindowHeight - 1);

Console.WriteLine("Press ENTER to continue....");

Console.ReadLine();

}

//method to print the array

public static void PrintArray(int [] scoresArray)

{

//using for loop , print each score

for (int i = 0; i < scoresArray.Length; i++)

{

Console.WriteLine(scoresArray[i]);//print each high score

}

}

//method to sort the array

public static int [] SortArrayHighToLow(int[] scoresArray)

{

Array.Sort(scoresArray);

return scoresArray;

}

}

}

==================================

Output :Run application using F5 and will get the screen as shown below

Kindly check the below Screenshot for Output :Program.cs

6 0
2 years ago
Other questions:
  • Which command would you use to move a file from one location to another?
    6·2 answers
  • There are many careers within the IT industry. _____ are responsible for organizing a company's data, making sure all the data i
    9·1 answer
  • 2. A body is thrown vertically<br>100 m/s Theme taken to retum​
    13·1 answer
  • Which one of these variables has an illegal name?
    11·1 answer
  • Examples of sound effects that can be used in video games and a cartoon
    8·1 answer
  • Huffman trees use the _________ of each character to work out their encoding. A) Frequency B) Order in ASCll
    12·1 answer
  • Insufficient vacuum will require the driver to _______________ to adequately activate the brakes?
    13·1 answer
  • In needs analysis: Group of answer choices the costs of different physical network design alternatives are assessed the rate of
    10·1 answer
  • Which of the following statements holds true for the term plug-in? Group of answer choices It refers to a program (typically a m
    11·1 answer
  • Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!