Exam Preparation
Здравейте, може ли малко помощ за тази задача
poorGradeLimit =int(input()) poorGradeCount = 0 problemCount = 0 gradesSum = 0 lastProblemName = "" problemName = "" grade = 0 while True: problemName = input() if problemName != ("Enough"): if grade <= 4: poorGradeCount += 1 if (poorGradeCount >= poorGradeLimit): print(f"You need a break, {poorGradeCount} poor grades.") break grade = int(input()) gradesSum += grade lastProblemName = problemName problemCount += 1 continue print(f"Average score: {(gradesSum / problemCount):.2f}") print(f"Number of problems: {problemCount}") print(f"Last problem: {lastProblemName}") break дава ми 90/100
Благодаря, получи се.
Моля, така и трябваше.