Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions