(IN PYTHON) First, take a set of 6 grades from a user and average them. Provide
ID: 3664600 • Letter: #
Question
(IN PYTHON) First, take a set of 6 grades from a user and average them. Provide the average to the user. You need to check to make sure the grades are within the normal range. If the grade is less than 0 or more than 100, issue a warning to the user. You don't need to take the grade again, just let the user know. Second, ask the user how many grades they have. Ask for all the grades and again provide an average. Make sure to check that the grades are within the normal range as above and issue a warning to the user.
Explanation / Answer
def main(): test1 = int(input('Enter test grade 1: ')) test2 = int(input('Enter test grade 2: ')) test3 = int(input('Enter test grade 3: ')) test4 = int(input('Enter test grade 4: ')) test5 = int(input('Enter test grade 5: ')) test6 = int(input('Enter test grade 6: ')) grade = (test1 + test2 + test3 + test4 + test5 + test6) input('press enter to continue') print(calc_average) print(determine_grade) print(getValidScore) print(isInvalidScore) return; def calcAverage(): grade / 6 return averageScore def determinGrade(score): if grade >= 90 and grade = 80 and grade = 70 and grade = 60 and grade 100: status = True else: status = False return status main()Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.