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
gayaneshka [121]
3 years ago
6

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:
OLga [1]3 years ago
6 0

Answer:

This program prompts for 3 score inputs and calculates the average score (of 3 Test scores) and repeats the process for 3 different students.

Explanation:

the programming language used is python

This is how the code should naturally look like:

student = 1

while student <= 3:

   total = 0

   for score in range(1, 4):

       score = int(input("Enter test score: "))

       total += score

       average = total/3

       print("Student ", student, "average: ", average)

  student += 1

To explain further i.e line by line

student = 1

This indicates that the scores that the program will prompt you to enter belong to the first student  

while student <= 3:

This is a continous loop that breaks only when the student number exceeds 3 (it lets you know that you're iterating over this program 3 times)

total = 0

this initializes the total score to zero. In python this is how variables are initialized an and assigned a data type especially when they will be used again within the program.

for score in range(1, 4):

      score = int(input("Enter test score: "))

The FOR loop is another control structure within the code. It allows you to Iterate between the range 1 - 4 ( i.e. 1,2,3) and prompts you to enter a test score 3 times.

total += score

for each time you are prompted to add a test score, the score is added to the total.

average = total/3

This line calculates the average by dividing by 3

print("Student ", student, "average: ", average)

This line prints out the student number and average score.

e.g: Student 1, average: 14

student += 1

This adds 1 to the previous students number to iterate to the next student.

Final Note: This code can be used for taking students test scores and calculating their average and can be modified further to check if a student passed of failed.

You might be interested in
What is the difference between First Person Shooters and Construction Simulations?
Marianna [84]

Answer:No clue

Explanation:

5 0
3 years ago
Read 2 more answers
____________ occurs when a provider does not support data export or when a provider's service is unavailable through others.
elixir [45]

Answer:

The correct answer to the following question will be Vendor Lock-In.

Explanation:

Vendor Lock-In: It is also known as Customer Lock-In. The Vendor Lock-In makes the costumer depends on services and products on the vendor. The costumers are not able to use another vendor without changing costs as it creates barriers.

Some ways to avoid Vendor Lock-In, these are as follows:

  • Design your application portable.
  • Keep watching vendor contracts.
  • Arrange both entry and exit with your vendor.

8 0
3 years ago
Query " frosty the snowman
julsineya [31]
I don't think that is a query...
5 0
3 years ago
Jonas is an experienced security professional who recently accepted a position in an organization that uses Check Point firewall
vichka [17]

Answer:

CCSA

Explanation:

CCSA is "Checkpoint Certified Security Administrator". This certification is best suited for Jonas.

8 0
3 years ago
Does any of yall know how to delete your account?
il63 [147K]

Answer:

No i really don't but why would you want to delete your account

8 0
2 years ago
Other questions:
  • Automotive engine cylinder heads can be made of what?
    7·1 answer
  • What type of Windows Server is the most likely server to be targeted by a computer hacker?
    13·2 answers
  • Consider the concept of cultural lag. Identify two American values that are “lagging.” What are three norms that are lagging? Ho
    11·1 answer
  • Most graphics software uses a process called pixel _________ to create new pixels by averaging the colors of nearby pixels.â
    6·1 answer
  • . Reorder the following efficiencies from smallest to largest:
    9·1 answer
  • Prewritten, commercially available sets of software programs that eliminate the need for a firm to write its own software progra
    5·1 answer
  • Smart art can be used to create _____that highlights relationships betweeen two items
    8·2 answers
  • _____ is the widely used transport layer protocol that most Internet applications use with Internet Protocol (IP).
    9·1 answer
  • Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal informati
    5·1 answer
  • A network device that is used to connect multiple devices together without segmenting a network is a __________.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!