21 lines
728 B
Python
21 lines
728 B
Python
def collect_grades():
|
|
grades = []
|
|
print('Enter a score on an exam. If the weight is different than x/100 specify using (grade)/(weight).')
|
|
while True:
|
|
_input = input('''Enter a score on an exam. ( 93 OR 93/100)\n(Press enter to stop):\n''')
|
|
if len(_input) == 0:
|
|
break
|
|
grades.append(_input)
|
|
return grades
|
|
|
|
if __name__ == '__main__':
|
|
print(collect_grades())
|
|
|
|
exam1_grade = float(input('Enter score on Exam 1 (out of 100):\n'))
|
|
exam2_grade = float(input('Enter score on Exam 2 (out of 100):\n'))
|
|
exam3_grade = float(input('Enter score on Exam 3 (out of 100):\n'))
|
|
|
|
overall_grade = (exam1_grade + exam2_grade + exam3_grade) / 3
|
|
|
|
print('Your overall grade is:', overall_grade)
|