subject
Computers and Technology, 20.08.2021 02:00 hlc614

Rewrite the grade program from Python - Conditional Execution using a function called computegrade that takes a float() score as its parameter and returns a grade as a string. As with the previous function assignment, that means the function will return grade, not print(grade); big difference! Run the program repeatedly to test various values for input (your goal is to test each of the conditions). Make sure you are still using input() to get the scores.
Submit your LastName-FirstName-IfFunction. py file
HINTS: Use the same grading structure as before:
Score Grade
>= 0.9 A
>= 0.8 B
>= 0.7 C
>= 0.6 D
< 0.6 F
Some sample output:
Enter score: 0.95
A
Enter score: perfect
Bad score
Enter score: 10.0
Bad score
Enter score: 0.75
C
Enter score: 0.5
F
Enter score: -0.75
Bad score
So again, for structure, name/date in a comment at the top, then define your function that returns a grade based on a float() score that is entered by the user. Print the grade that is returned from the function.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 22.06.2019 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
You know the right answer?
Rewrite the grade program from Python - Conditional Execution using a function called computegrade t...
Questions
question
Mathematics, 05.05.2021 23:10
question
Mathematics, 05.05.2021 23:10
question
Health, 05.05.2021 23:10
question
English, 05.05.2021 23:10
Questions on the website: 13722361