Skip to content

Instantly share code, notes, and snippets.

View dersavage's full-sized avatar

Der Savage dersavage

View GitHub Profile
@dersavage
dersavage / stats_jan_cousin.py
Created December 9, 2024 17:27
Jan's cousin's solution for stats_printer.py
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))
@dersavage
dersavage / stats_printer_official.py
Created December 9, 2024 17:03
Mooc.fi official solution for end of Part 4 project
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