Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created Feb 25, 2018
Embed
What would you like to do?
Codecademy export
# Complete the if and elif statements!
def grade_converter(grade):
if grade >= 90:
return "A"
elif grade >= 80:
return "B"
elif grade >= 70:
return "C"
elif grade >= 65:
return "D"
else grade < 65:
return "F"
# This should print an "A"
print grade_converter(92)
# This should print a "C"
print grade_converter(70)
# This should print an "F"
print grade_converter(61)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment