Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python: Rewrite the Question 3 as a function that is called computeGrade that takes a score as its parameter and returns a grade as a
Python:
Rewrite the Question 3 as a function that is called computeGrade that takes a score as its parameter and returns a grade as a string. Function prototype: computeGrade(score) You need to create this function and call this function. When you call the function, try to make your code to be interactive. Example input and output:
Enter score: 0.95 A
Enter score: perfect Invalid input
Enter score: 10.0 Invalid input
Enter score: 0.75 C
Enter score: 0.5 F
#question3 score-input ("Enter score: ") try score-float (score) if(score-0.0 and score-0.9): print("A") elif(score>-0.8): print("B") elif(score>-0.7) print("C") elif(score-0.6): print("D") elif(scoreStep 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