Skip to content

Instantly share code, notes, and snippets.

@JosephTLyons
Created November 25, 2019 05:08
Show Gist options
  • Save JosephTLyons/8cda6ecd20bdcd1e0624f72831599437 to your computer and use it in GitHub Desktop.
Save JosephTLyons/8cda6ecd20bdcd1e0624f72831599437 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
values = []
for i in range(5):
values.append(int(input("Enter a number: ")))
average = sum(values) / len(values)
if average <= 50:
print("Failure")
elif average <= 60:
print("D Grade")
elif average <= 70:
print("C Grade")
elif average <= 80:
print("B Grade")
elif average <= 90:
print("A Grade")
else:
print("S Grade")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment