Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A teacher wants a program to give extra points to students who fail a test. Write a Python program to do the following: Ask the

A teacher wants a program to give extra points to students who fail a test. Write a Python program to do the following:

  1. Ask the user to enter 5 test scores. Store the scores in a list. Display the list.
  2. Copy all 5 test scores to another list. Use a loop to examine each test score in the new list. If the score is below 60, add 10 extra points to the score. Display the list.
  3. Compare the old score and new score of each student. If the old score and new score are different, display the two scores.

    The following output is an example:

    Enter a test score: 45

    Enter a test score: 77

    Enter a test score: 88

    Enter a test score: 52

    Enter a test score: 90

    All scores: [45.0, 77.0, 88.0, 52.0, 90.0]

    Students who scored below 60 get 10 extra points.

    All scores: [55.0, 77.0, 88.0, 62.0, 90.0]

    Students whose scores have changed:

    Old score: 45.0 New score: 55.0

    Old score: 52.0 New score: 62.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago