-
-
Save codecademydev/73e6eab07bc4dd4d4bf1b153259acc15 to your computer and use it in GitHub Desktop.
Codecademy export
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
# 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: | |
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