2. Create a module named grading that contains the following two functions: • calc_average() - this function should accept five (integer) test scores as arguments and return the average of the scores. • determine_grade() – this function should accept a test score as an argument and return a letter grade (string) for the score, based on the following: A 90-100 80-89 C 70-79 60-69 F Below 60 Write a program that imports your grading module. Your program should include a main() function that asks the user to enter five test Scores. The program should display a letter grade for each score and the average test score rounded to 1 decimal place.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question
2. Create a module named grading that contains the following two
functions:
• calc_average() – this function should accept five (integer) test
Scores as arguments and return the average of the scores.
• determine_grade() – this function should accept a test score as
an argument and return a letter grade (string) for the score,
based on the following:
A
90-100
80-89
C
70-79
60-69
F
Below 60
Write a program that imports your grading module. Your program
should include a main() function that asks the user to enter five test
scores. The program should display a letter grade for each score and
the average test score rounded to 1 decimal place.
Transcribed Image Text:2. Create a module named grading that contains the following two functions: • calc_average() – this function should accept five (integer) test Scores as arguments and return the average of the scores. • determine_grade() – this function should accept a test score as an argument and return a letter grade (string) for the score, based on the following: A 90-100 80-89 C 70-79 60-69 F Below 60 Write a program that imports your grading module. Your program should include a main() function that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score rounded to 1 decimal place.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Variables
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
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