Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python Write a program that calculates the average percent scores of your courses and your overall term percent. Each course has a variable number of

python Write a program that calculates the average percent scores of your courses and your overall term percent. Each course has a variable number of tests used to determine the course average percent. A custom function named grade_pct and main() must be used as below. The grade_pct function must be stored in a separate module file named as you choose. See Sample Output. In the main() function:

  • import your module.
  • prompt the user to enter the number of courses taken in the term.
  • use a loop to:
    • enter each course name.
    • call the grade_pct function.
    • print the average for the course accurate to one decimal place.
  • print the overall term average accurate to one decimal place by averaging the course scores.

In the grade_pct function:

  • prompt the user for the number of tests in the course.
  • prompt the user to enter the scores for the tests.
  • return the average for the course.

Sample Output (user inputs shown in boldface) Enter how many courses did you study? 2

Enter course name Algebra Getting data for Algebra course How many tests in this course? 2 Enter test score 80 Enter test score 90 Average for Algebra is 85.0%

Enter course name Python Getting data for Python course How many tests in this course? 3 Enter test score 80 Enter test score 90 Enter test score 100 Average for Python is 90.0%

Your average for the term is 87.5%

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_2

Step: 3

blur-text-image_3

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

How is social networking used in informal training?

Answered: 1 week ago

Question

What are some career development methods?

Answered: 1 week ago