Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- testscore = int(input("What percent did the student achieve? "))
- while testscore < 0 or testscore > 100:
- testscore = int(input("What percent did the student achieve? "))
- if testscore >= 80:
- grade = "A"
- elif testscore >= 70:
- grade = "B"
- elif testscore >= 60:
- grade = "C"
- elif testscore >= 50:
- grade = "D"
- elif testscore >= 40:
- grade = "E"
- else:
- grade = "U"
- print("A percentage of " + str(testscore) +" gains you a grade " + grade)
Advertisement
Add Comment
Please, Sign In to add comment