Last active
June 2, 2020 09:44
-
-
Save alichtman/11815ec1c6f00720ded8e98a205c9909 to your computer and use it in GitHub Desktop.
LING490-LS3-grade-calc.py
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
# LING490-LS3 Grade Calculator | |
# Written by: Aaron Lichtman | |
# Adjustment for dropped homework. Replace the weight you choose to drop with 0. | |
adj = REMOVED_WEIGHT_HERE / 6 | |
weight = { | |
"ch03" : .03 + adj, | |
"hw01" : .08 + adj, | |
"hw02" : .10 + adj, | |
"hw03" : .10 + adj, | |
"hw04" : .04 + adj, | |
"hw05" : .10 + adj, | |
"hw06" : .20 + adj, | |
"midterm" : .35, | |
"extra_credit": .03 | |
} | |
# Entries in this dict should be the value that fills in the phrase: x / 100 | |
grade = { | |
"ch03" : , | |
"hw01" : , | |
"hw02" : , | |
"hw03" : , | |
"hw04" : , | |
"hw05" : , | |
"hw06" : , | |
"midterm" : , | |
"extra_credit": | |
} | |
grade = weight["ch03"] * grade["ch03"] + \ | |
weight["hw01"] * grade["hw01"] + \ | |
weight["hw02"] * grade["hw02"] + \ | |
weight["hw03"] * grade["hw03"] + \ | |
weight["hw04"] * grade["hw04"] + \ | |
weight["hw05"] * grade["hw05"] + \ | |
weight["hw06"] * grade["hw06"] + \ | |
weight["midterm"] * grade["midterm"] + \ | |
weight["extra_credit"] * grade["extra_credit"] | |
print("Grade without hw6 or extra credit:", grade) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment