This file contains hidden or 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
exam_p, exer_p, grade_distribution = [], [], [0] * 6 | |
while True: | |
incoming_data = input("Exam points and exercises completed): ") | |
if incoming_data == '': | |
break | |
first_num, second_num = map(int, incoming_data.split()) | |
exam_p.append(first_num) | |
exer_p.append(min(second_num // 10, 10)) |
This file contains hidden or 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 exam_and_exercise_completed(inpt): | |
space = inpt.find(" ") | |
exam = int(inpt[:space]) | |
exercise = int(inpt[space+1:]) | |
return [exam, exercise] | |
def exercise_points(amount): | |
return amount // 10 |