LU04.L02: Notenschnitt

Blockly

Python

num_marks = input('Anzahl Noten > ')
count = 0
total_marks = 0
while count < num_marks:
    mark = input('Note >')
    total_marks = total_marks + int(mark)
    count = count + 1
average = total_marks / num_marks
print('Durchschnitt:' + str(average))