Computers and Technology
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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 13:30, ReaLily
1. technician a says horsepower information can be used by consumers to compare the power of different automobile engines. technician b says that manufacturers will often list the horsepower output of their engines in the online service information. who is right?
Answers: 2
image
Computers and Technology, 22.06.2019 20:00, manyah6189
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, leapfroggiez
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, joybeth9591
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
Do you know the correct answer?
Rewrite the grade program from Python - Conditional Execution using a function called computegrade t...

Questions in other subjects:

Konu
Arts, 05.05.2021 21:20