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
dalvyx [7]
2 years ago
8

What does the following program do? student = 1 while student <= 3: total = 0 for score in range (1,4): score = int(input("En

ter test score: ")) total += score average = total/3 print("Student ", student, "average: ", average) student += 1

Computers and Technology
1 answer:
sukhopar [10]2 years ago
6 0

Answer:

The code requests for the scores of three students for three courses offered by each student.

It calculates and print the average score for each student

Explanation:

The code written in Python programming language uses a while to get student 1-3 and a for loop to get scores for course 1-3

See attached code and output

You might be interested in
File Sales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. It then
myrzilka [38]

Answer:

import java.util.Scanner;

public class Sales

{

public static void main(String[] args) {

   

    int sum;

    Scanner input = new Scanner(System.in);

   

    System.out.print("Enter number of salespeople: ");

    int salespeople = input.nextInt();

    int[] sales = new int[salespeople];

       

    for (int i=0; i<sales.length; i++)

    {

     System.out.print("Enter sales for salesperson " + (i+1) + ": ");

     sales[i] = input.nextInt();

    }

    System.out.println("\nSalesperson   Sales");

    System.out.println("--------------------");

    sum = 0;

       int maxSale = sales[0];

       int minSale  = sales[0];

       int minId=1;

       int maxId=1;

    for (int i=0; i<sales.length; i++)

    {

               System.out.println("     " + (i+1) + "         " + sales[i]);

 sum += sales[i];

  if(maxSale < sales[i])

           {

               maxSale = sales[i];

               maxId = i+1;

           }

           if(minSale > sales[i])

           {

               minSale = sales[i];

               minId = i+1;

           }

   }

System.out.println("Total sales: " + sum);

       System.out.println("The average sale is: " + sum / salespeople );

       System.out.println("Salesperson "+ maxId + " had the highest sale with "+ maxSale + ".");

       System.out.println("Salesperson "+ minId + " had the lowest sale with "+ minSale + ".");

       

       int amount = 0;

       int counter = 0;

       System.out.print("Enter an amount: ");

       amount = input.nextInt();

       for (int i=0; i<sales.length; i++)

    {

     if(sales[i] > amount) {

         counter++;

         System.out.println("Salesperson "+ (i+1) + " exceeded given amount. (Number of sales: " + sales[i] +")");

     }

    }

       System.out.println("Number of salespeople exceeded given amount is: "+ counter);

}

}

Explanation:

- Ask the user for the number of salesperson

- According to entered number, create an array called sales to hold sale number for each person

- In the first for loop, assign the given sales numbers

-  In the second for loop, print all the sales people with sales, calculate the total sales. Also, find the minimum and maximum sales numbers with associated individuals.

- Print total, average, highest, and lowest sales.

- Ask user enter an amount

- In the third for loop, find the sales people who exceeded this amount.

- Print number of sales people who exceeded the amount.

8 0
3 years ago
Create an Entity-Relationship Diagram with the following requirements.
melamori03 [73]

Answer:

idk

Explanation:

6 0
3 years ago
Jax earned 144 points on a research project. In this situation, what is the number 144? Group of answer choices data information
fredd [130]

Answer: data

Explanation:

Data refers to symbols or numbers that aren't meaningful. It's an an individual unit which consists of raw materials. Data hato be interpreted in order to become meaningful. They are fact or figures. Examples of data include 24, London, 144 etc.

Information on the other hand is a data that has been processed. e.g. Bob has an aggregate score of 144. Based on the question given, the number 144 is a data as it isn't meaningful yet.

3 0
2 years ago
Suppose that outfile is an ofstream variable and output is to be stored in the file outputData.out. Which of the following state
katrin [286]

Answer:

outFile.open("outputData.out");

4 0
2 years ago
WHAT DOES THE TRANSPORT LAYER USE TO MAKE SURE THAT A MESSAGE IS REASSWMBLED CORRECTLY ON THE RECEIVING DEVICES?
mrs_skeptik [129]
The answer is  sequence  number
6 0
3 years ago
Other questions:
  • What are the five resources paid for by local taxes
    15·1 answer
  • What are two major techniques involved in green computing
    14·1 answer
  • What is a word processor in ms word​
    9·2 answers
  • What device provides ports to allow a laptop to easily connect to a full-sized monitor, keyboard, ac power adapter, and other pe
    11·1 answer
  • What is the importance of human flourishing to science and technology?​
    8·1 answer
  • The loop function is similar to range(), but handles the parameters somewhat differently: it takes in 3 parameters: the starting
    14·1 answer
  • We made a distinction between the forwarding function and the routing function performed in the network layer. What are the key
    6·1 answer
  • Apps are designed by___.
    11·2 answers
  • Indicate if the statement is true or false False 1. A spreadsheet cannot recalculate after you have changed data in your workshe
    15·1 answer
  • In the EXPLORE online library, the ratio of the number of novels to that of dictionaries is 2:3 and the total number of novels i
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!