Question: Specification This program should prompt the user for a score, convert it into an integer and print the letter grade for that score in this
Specification
This program should prompt the user for a score, convert it into an integer and print the letter grade for that score in this course.
You will find the ranges for each of the letter grades here.
You should use a single if statement for this assignment.
Your if statement should not print anything, but should set a variable that is used in a final print statement at the end of the program.
Suggestions
Write this script in stages, testing your script at each step
Copy the script gradepy from Class Notes into the file hwpy
Test this file several times giving it different grade values.
Fix any errors you find.
Add code for A
Test the code and fix any errors.
Add code for B and B
Test the code and fix any errors.
Add code for C and C
Test the code and fix any errors.
Add code for D and D
Test the code and fix any errors.
Testing
Your output should look something like this
$ python hwpy
What is your score?
The grade for a score of is A
$ python hwpy
What is your score?
The grade for a score of is A
$ python hwpy
What is your score?
The grade for a score of is B
$ python hwpy
What is your score?
The grade for a score of is B
$ python hwpy
What is your score?
The grade for a score of is B
$ python hwpy
What is your score?
The grade for a score of is C
$ python hwpy
What is your score?
The grade for a score of is C
$ python hwpy
What is your score?
The grade for a score of is C
$ python hwpy
What is your score?
The grade for a score of is D
$ python hwpy
What is your score?
The grade for a score of is D
$ python hwpy
What is your score?
The grade for a score of is D
$ python hwpy
What is your score?
The grade for a score of is F
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
