Skip to content

Instantly share code, notes, and snippets.

@nicholaskajoh
Created January 5, 2017 15:08
Show Gist options
  • Save nicholaskajoh/0e54d3c6cb8263f38de4bc0c29087149 to your computer and use it in GitHub Desktop.
Save nicholaskajoh/0e54d3c6cb8263f38de4bc0c29087149 to your computer and use it in GitHub Desktop.
Fanan Kwanga's Take Home
def gradingSystem():
print("Enter 'done' to end program.")
score = input("Enter student's score between 0 to 100:")
while(score != "done"):
score = float(score)
if score >= 101 or score < 0:
print("Sorry, score out of grade system range")
elif score >= 90:
print("You got an 'A'")
elif score >= 80:
print("You got a 'B'")
elif score >= 70:
print("You got a 'C'")
elif score >= 60:
print("You got a 'D'")
elif score >= 50:
print("You got an 'E'")
else:
print("You got an 'F'")
score = input("Re-enter score or type 'done':")
if __name__ == '__main__':
gradingSystem()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment