Created
October 24, 2014 16:15
-
-
Save pbhj/ccd0f6150ceef7fc3115 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = float(raw_input("Enter a score between 0.0 and 1.0: ")) | |
# give grades for scores in range | |
# elif skips to end of else: | |
if s > 0.0 and s < 1.0: | |
if s >= 0.9: | |
print "A" | |
elif s >= 0.8: | |
print "B" | |
elif s >= 0.7: | |
print "C" | |
elif s >= 0.6: | |
print "D" | |
else: | |
print "F" | |
# if score wasn't in range print error. | |
else: | |
print "Error: score out of range. Exiting." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
actually this is assignment 3.3