Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Filename: assign 3 - 3 . py Write a program that calls the following functions to produce the output shown below. * calcavg function takes

Filename:
assign3-3.py
Write a program that calls the following functions to produce the output shown below.
*calcavg function takes five grades as parameters, calculates the average, and returns the average.
getletter function takes the average as a parameter and returns the letter grade. You can use the following table to find the letter grades.
*printresults function takes the average and letter grade as parameters, and prints the output as shown below.
Write a program that takes 5 grades. Verify the grades and make sure all the grades are numeric. If there are non-numeric grades, it should display the proper message to the user. If all the grades are numeric, use calcavg function to get the average, use getletter function to get your letter grade, and print the results using the printresults function.
\table[[Numeric Grade,Letter Grade],[90,A],[80,B],[70,C],[60,D],[60,F]]
Input:
Output:
a) Average: 74.2
Letter grade: C
b) Average: 89.2
Letter grade: B
c) Error, all grades must be numeric.
image text in transcribed

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago