Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this assignment you will write Python code which will read in a set of grades from a file grades.txt store them in a list,
In this assignment you will write Python code which will read in a set of grades from a file grades.txt store them in a list, calculate the average grade using a definite loop, and create a list of letter grades based on a grading rubric. Consider the following program 2 skeleton def getarades (grades): #dput grades from the file grades. txt #see hint provided in the program2 folder on Canvas def axa(grades): average grades using a definite loop return avg def classify (grades): assign each grade a letter grade. #see chapter 7 lecture slide 46 and chapter 8 slide 62 return mvletarades def maia): grades - [] getarades (grrades are ", grades) Bxist^"The gxa(arades) axgarade - avg Rriatl"Average grade is ",avgarade) classify (grades) Rriatl"The letter grades are ",lettergrades) main()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started