-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b76769
commit 37232d7
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# A function that grades a persons final result by taking into account their exam grade and the amount of projects they've finished | ||
|
||
def final_grade(exam, projects): | ||
if exam > 90 or projects > 10: | ||
return 100 | ||
elif exam > 75 and projects >= 5: | ||
return 90 | ||
elif exam > 50 and projects >= 2: | ||
return 75 | ||
else: | ||
return 0 |