Question: THIS USING PYTHON Determine the average grade in the grades variable using the for statement. Pseudocode: Intialize the variables. Use the for statement to iterate
THIS USING PYTHON
Determine the average grade in the grades variable using the for statement.
Pseudocode: Intialize the variables. Use the for statement to iterate through the grades variable. If the grade is less than 70, then do not include it in the store_grades list (hint: continue keyword). Each grade will be appended to the store_grades list. Each grade will be added to the total variable. Determine the average in stored_grades. Display the list of stored_grades. Display the average of the grades inside stored_grades.
#Use this cell for problem 1
grades = [60, 70, 70, 80, 90] #a list of five student grades for an assignment total = 0 #Initialize variable -- used to store the sum of grades average = 0 #Initialize variable --used for total / len(grades) in the for statement store_grades = []
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
