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
lara31 [8.8K]
3 years ago
5

Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If th

e score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average.
Computers and Technology
1 answer:
lana [24]3 years ago
4 0

Answer:

scores = []

total = 0

count = 0

highest = 0

lowest = 10

while True:

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

   if score == 99:

       break

   

   if score < 0 or score > 10:

       print("Score must be between 10 and 0")

   else:

       total += score

       count += 1

       scores.append(score)

       

       if score > highest:

           highest = score

       if score < lowest:

           lowest = score

           

average = total / count

print("Scores:")

for s in scores:

   print(s, end=" ")

print()

print("The highest score is " + str(highest))

print("The lowest score is " + str(lowest))

print("The arithmetic average is " + str(average))

Explanation:

*The code is in Python.

Initialize the values

Create an indefinite while loop. Inside the loop, ask the user to enter the quiz score. If the score is 99, stop the loop. If the score is smaller than 0 or greater than 10, warn the user. Otherwise, add the score to total, increment the count by 1, and add the score to the scores list. Then, determine the highest and lowest value using if statements.

After the loop, calculate the average.

Print the valid scores, highest score, lowest score and arithmetic average

You might be interested in
What kind of service is typically not offered by hosting service​
Finger [1]

Answer:

I think the answer is Dynamic DNS

Explanation:

7 0
3 years ago
True false you cannot fill in a callout​
Svetllana [295]
??????? Can you explain the question some more
8 0
3 years ago
A(n) ______of the audio or video clip makes the content easily accessible to people with hearing disabilities.
defon

subtitles

hope that helped you

7 0
4 years ago
Read 2 more answers
What decimal value does the 8-bit binary number 10011110 have if it is on a computer using signed-magnitude representation?
Ymorist [56]

1 0 0 1 1 1 1 0

0 * 2^{0} + 1 * 2^{1} + 1 * 2^{2} + 1 * 2^{3} + 1 * 2^{4}  + 0 * 2^{5} + 0 * 2^{6} = 30

The sign digit is a 1, so the entire number is negative, which gives -30.

3 0
4 years ago
What term is defined as software that allows users to use and adapt it for any purpose, often allowing the public to participate
Alex787 [66]

Answer:

The answer is open source

Explanation:

hope this helps

# look it up on google

6 0
3 years ago
Other questions:
  • How do you change a Word document to an .html file? Save it as a Web page. Save it as a plain text document. Copy it in rich tex
    14·1 answer
  • Which VMware product would allow administrators, to manage enterprise desktops with increased reliability, security, end-user ha
    11·1 answer
  • Wrire a code that display elements at indices 1 and 4 in the follwoing array.
    12·1 answer
  • When you see a/an _______ pointer, this means you can drag the row or column border to change height or width.
    12·2 answers
  • The Internet has its roots in a network that became functional in 1969, linking scientific and academic researchers across the U
    10·1 answer
  • Please I need this answer now.<br>this is the fill in the blanks​
    14·1 answer
  • Ask the user to input an integer. Print out the next three consecutive numbers.
    14·2 answers
  • What does FLUX do when soldering an electrical joint?
    13·2 answers
  • Text me on instagram forever.brazy so we can watch a movie​
    15·1 answer
  • Descending selection sort with output during execution
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!