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
katen-ka-za [31]
3 years ago
13

This assignment involves writing a Python program to compute the average quiz grade for a group of five students. Your program s

hould include a list of five names. Using a for loop, it should successively prompt the user for the quiz grade for each of the five students. Each prompt should include the name of the student whose quiz grade is to be input. It should compute and display the average of those five grades and the highest grade. You should decide on the names of the five students. Your program should include the pseudocode used for your design in the comments.

Computers and Technology
1 answer:
umka21 [38]3 years ago
3 0

Answer:

Here is the Python program along with the comments of program design

#this program is designed to compute the average quiz grades for a group of five students  

students = ["Alex", "John", "David", "Joseph", "Mathew"] #create a list of 5 students  

grades = []  # create an empty list to store the grades in  

for student in students: #loop through the students list  

   grade = input("Enter the quiz grade for "+student+": ") #prompt the user for the quiz grade of each student

   #store the input grades of each student to grade

   grades.append(int(grade))  # convert the grade to an integer number and append it to the list  

print("Grades are:", grades) #display the grades of five students  

average = sum(grades) / len(grades) #compute the average of five grades  

print("The average of grades is:", average) #display the average of five grades  

highest = max(grades) #compute the highest grade

print("The highest grade is:", highest) #print highest grade  

Explanation:

The program first creates a list of 5 students who are:

Alex

John

David

Joseph

Mathew

It stores these into a list named students.

Next the program creates another list named grades to store the grades of each of the above students.

Next the program prompts the user for the quiz grade for each of the five students and accepts input grades using input() method. The statement contains student variable so each prompt includes the name of the student whose quiz grade is to be input. Each of the grades are stored in grade variable.

Next the append() method is used to add each of the input grades stored in grade to the list grades. The int() method is used to first convert these grades into integer.

Next print() method is used to display the list grades on output screen which contains grades of 5 students.

Next the average is computed by taking the sum of all input grades and dividing the sum by the total number of grades. The sum() method is used to compute the sum and len() method is used to return the number of grades i.e. 5. The result is stored in average. Then the print() method is used to display the resultant value of average.

At last the highest of the grades is computed by using max() method which returns the maximum value from the grades list and print() method is used to display the highest value.

The screenshot of the program and its output is attached.

You might be interested in
Consider the eight bit signed binary number 1110 0101. Convert it to signed decimal from assuming the signed binary number is re
alukav5142 [94]

Answer:    -26

Explanation:

We have:  1 1 1 0   0 1 0 1

Since it’s one’s complement representation, then we check the very first digit to state if the number is negative or positive. Since the very first digit to the left is 1, then the number will be negative.

When it is negative, we now flip the bits, so that we get:

0 0 0 1   1 0 1 0

Notice we just turn the 1’s into 0’s and vice versa.

We now convert this binary into decimal:

We assign to each digit the corresponding power of 2.  

See it in a table:

\begin{matrix}0&0&0&1&1&0&1&0\\2^7&2^6&2^5&2^4&2^3&2^2&2^1&2^0 \end{matrix}

Then multiplying each digit by its corresponding power of 2 and then adding the results, we get:

2^4+2^3+2^1

We get:

16+8+2=26

Since we stated that the number is negative, then, the final result is: -26

4 0
3 years ago
When should you use an electronic spreadsheet
nadezda [96]

Answer:

An electronic spreadsheet can be used to perform numerical calculations automatically

Explanation:

An electronic spreadsheet can be used to perform numerical calculations automatically. This spreadsheets are set up in the form of a table with rows and columns.

Data is stored in a cell formed as a result of intersection of each row and column.

Their primary purpose is to organize and categorize data into a logical format. This data then can be used to organize and grow the business.

6 0
3 years ago
Create a java program using the following instructions:GymsRUs has a need to provide fitness/health information to their clients
poizon [28]

Answer:

See attached file for detailed code.

Explanation:

See attached file for explanation.

Download txt
8 0
4 years ago
Create an application named TestClassifiedAd that instantiates and displays at least two ClassifiedAd objects. A ClassifiedAd ha
arlik [135]

Answer:

Following is given the code with all necessary descriptions as comments in it. The output is also attached under the code. I hope it will help you!

Explanation:

5 0
3 years ago
4. Refer to the following code the answer the remaining questions. loop: load r1, r5, 40 ; r1  data_memory[r5 + 40] add r1, r1,
Anni [7]

Answer:

See explaination

Explanation:

Loop Unrolling

Assembly code

loop:

load r1, r5, 40 //r1 = Mem[r5 + 40]

load r6, r5, 36 //r6 = Mem[r5 + 36]

add r7, r6, r2 //r7 = r6 + r2

store r7, r5, 36 //Mem[r5 + 36] = r7

add r1, r1,r2 //r1 = r1 + r2

store r1, r5, 40 //Mem[r5 + 40] = r1

addi r5, r5, -8 //r5 = r5 -8

bne r5, 0, loop //if(r5 != 0)branch to loop

4 0
4 years ago
Other questions:
  • Attacker player X is standing still on a corner kick, as the ball is played, he jumps up with his arms flailing above his should
    8·1 answer
  • Match the web development languages to their type.
    13·1 answer
  • As you increase the speed of your car, the engine has to operate at higher and higher speeds in order to move the car along. If
    11·2 answers
  • Nadia's productivity at work is being hurt due to the large quantity of unwanted e-mail she receives. What steps can she take to
    8·1 answer
  • Hands-On Project 15-4 Make Network Cables
    8·1 answer
  • What is the meaning of heart symbol in facebook?
    14·1 answer
  • If you Buy my group clothing in R.o.b.l.o.x for a donation i will make you brainliest
    14·2 answers
  • Which of the following is not true?A. An organization may express its cybersecurity state through a Current Profile to report re
    10·1 answer
  • In your own words, describe invention.
    8·2 answers
  • Cidr simplifies how routers and other network devices need to think about the parts of an ip address, but it also allows for mor
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!