Created
November 17, 2022 22:14
-
-
Save blitzblade/3558b86fdd1baeef7a65ad400e4ec13b to your computer and use it in GitHub Desktop.
gradingsystem.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
def gradingStudents(grades): | |
# Write your code here | |
def roundd(grade): | |
if grade >= 38: | |
int_part = grade // 10 #64/10 | |
remainder = grade % 10 | |
if remainder >= 8: | |
return int_part*10 + 10 | |
elif 5 >= remainder >= 3: | |
return int_part*10 + 5 | |
return grade | |
result = [roundd(grade) for grade in grades] | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment