Skip to content

Instantly share code, notes, and snippets.

@pbhj
Created October 24, 2014 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbhj/ccd0f6150ceef7fc3115 to your computer and use it in GitHub Desktop.
Save pbhj/ccd0f6150ceef7fc3115 to your computer and use it in GitHub Desktop.
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."
@pbhj
Copy link
Author

pbhj commented Oct 24, 2014

actually this is assignment 3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment