Question: Write a Python program to calculate the letter grade from the numeric values entered by the user. Prompt the user to enter numeric scores out

Write a Python program to calculate the letter grade from the numeric values entered by the user.

Prompt the user to enter numeric scores out of 100 for 4 courses, and save the total score in a variable called totalscore.

Define a user designed function called calcgrade. This calcgrade function takes a parameter. You can name the parameter anything you like,for example it could be named rawscore.

The function should take this rawscore and divide it by 4. The function should then calculate and return the letter grade based on the value obtained from the division

If the value is >= 90, letter grade is A

if the value is >= 80, letter grade is B

if the value is >= 70, letter grade is C

if the value is >= 60, letter grade is D

else letter grade is F

Program should print the raw score and the letter grade.

Note: When you call the function, remember to use the variable that stores the total of all four courses, if you used the name totalscore, then your function call would be something like

calcgrade(totalscore)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!