Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please the answer should follow the EXACT! Format below. Thank you and please test your answer EXACTLY! how it is tested here. Thank you Zuestion

image text in transcribedplease the answer should follow the EXACT! Format below. Thank you
image text in transcribedand please test your answer EXACTLY! how it is tested here. Thank you
Zuestion 2 . (5 points) Nrite a Python function called alphaGrade that takes a value as input (a real number from 0 to 100 , inclusive) and returns an alphabetic grade. No need to check if the value is 0100 at this time. For this question, we assume that this is the case. We will check this in Question 3. Add in comments the type contract. Use the following correspondence (from uOttawa): Question 3. (5 points) Write a Python function called alphaGradeCheck which uses the function from Question 2, but. before it reads the final numerical grade from the keyboard and checks that the value is from 0 to 100 ( 0 and 100 included). If this is not the case, it asks the user to re-enter the grade, even several times, until the value is within the expected range. We assume that the user gives an integer or real number, no need to check that for the moment. The function should call the alphaGrade function of question 2 and display a message with its result. It must also display the message: "Failed" if the grade was "E" or "F", or the message "Succeeded" for the other values. The type contract is 0> None. \# testing Question 2 alphagrade (100) 'At' alphagrade (89) ' A ' alphagrade (56) 'D+'. alphagrade (30) 'E' \# testing Question 3 alphagradecheck () Please enter the final grade (from 0 to 100) : 105 Please enter the final grade (from 0 to 100): 207.6 Please enter the final grade (from 0 to 100): 89 The alpha grade is: A Succeeded alphagradecheck () Please enter the final grade (from 0 to 100): 12 Please enter the final grade (from 0 to 100): 28 The alpha grade is: E Failed

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions