Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 1: Convert the previous marks-to-grade example into a function that receives the letter mark as a variable and returns the associated number grade. Exercise
Exercise 1: Convert the previous marks-to-grade example into a function that receives the letter mark as a variable and returns the associated number grade.
Exercise 2: Modify the function in the previous example to return the Grade Point Average (GPA) based on the mark.
Exercise 3: Modify the above function to allow the student to enter the marks for 5 courses and calculate the semester average and GPA.
mark = input("What is your mark? ") Grade Range Points 2 mark - int (mark) A 90-100 4 4f(mark-90): Grade-"A Grade-"A-" Grade= "B+" Grade -"B Grade"B-" Grade "C+" Grade = "C" Grade"C-" Grade = "D+" Grade"D Grade "F" 87-893.7 -6- elif(mark>-87 and marke-89): B+ 84-86 3.38elif(mark-84 and mark-80 and marke-83): B- 77- 79 2.712elif(mark 77 and markStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started