2. Test Scores File: test_scores.py Write pseudocode for the main() part of a program that asks the user to enter 4 test scores between 0 and 100, then displays a JCU grade for each score and also the average test score. When you have written the pseudocode for main, implement your solution in Python code and test it with a range of meaningful data. Remember that we've done the JCU grades question before, so copy your function from that practical code file. Sample Output Score: 3 Score: 50.5 Score: 66 Score: 100 Score 3.0, which is N Score 50.5, which is P Score 66.0, which is C Score 100.0, which is HD The average score was 54.875 Enhancements When you have that working... We asked for 4 scores. Have a look at your code... did you use 4 as a numeric literal or a constant? Change 4 to 3... Did you have to change the program in more than one place? If so, then you've missed one of the things we've taught... As a strong guideline: if you need to use the same literal more than once, you should turn it into a constant . Do this now if you haven't already. Add error-checking to the test score inputs to ensure they are between 0 and 100. You should be getting good at this by now :) but do notice that it's easy to do this kind of "iterative development" where you don't try and get it working all at once. Error-checking is a common feature to add after you have the core functionality working. Add a feature that shows the user what the trend is. If the last score in the list is higher than the average, then the trend is "positive", otherwise it's "not positive". Upgrade your print outputs so the output is formatted nicely like: Score 1: 3 Score 2: 50.5 Score 3: 66 Score 4: 100 Score 1 was 3.0, which is N Score 2 was 50.5, which is P Score 3 was 66.0, which is C Score 4 was 100.0, which is HD The average score was 54.875 The trend is positive

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 8PP: (Statistical) In many statistical analysis programs, data values considerably outside the range of...
icon
Related questions
Question

2. Test Scores

File: test_scores.py

Write pseudocode for the main() part of a program that asks the user to enter 4 test scores between 0 and 100, then displays a JCU grade for each score and also the average test score.

When you have written the pseudocode for main, implement your solution in Python code and test it with a range of meaningful data.

Remember that we've done the JCU grades question before, so copy your function from that practical code file.

Sample Output

Score: 3
Score: 50.5
Score: 66
Score: 100
Score 3.0, which is N
Score 50.5, which is P
Score 66.0, which is C
Score 100.0, which is HD
The average score was 54.875

Enhancements

When you have that working...

  • We asked for 4 scores. Have a look at your code... did you use 4 as a numeric literal or a constant?
    Change 4 to 3... Did you have to change the program in more than one place?
    If so, then you've missed one of the things we've taught...
    As a strong guideline: if you need to use the same literal more than once, you should turn it into a constant .
    Do this now if you haven't already.

  • Add error-checking to the test score inputs to ensure they are between 0 and 100.
    You should be getting good at this by now :) but do notice that it's easy to do this kind of "iterative development" where you don't try and get it working all at once. Error-checking is a common feature to add after you have the core functionality working.

  • Add a feature that shows the user what the trend is.
    If the last score in the list is higher than the average, then the trend is "positive", otherwise it's "not positive".

  • Upgrade your print outputs so the output is formatted nicely like:

Score 1: 3
Score 2: 50.5
Score 3: 66
Score 4: 100
Score 1 was 3.0, which is N
Score 2 was 50.5, which is P
Score 3 was 66.0, which is C
Score 4 was 100.0, which is HD
The average score was 54.875
The trend is positive
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning