Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You want to write a Python program to compute the average of three integer quiz grades for a single student. Decide what variables your program

You want to write a Python program to compute the average of three integer quiz grades for a single student. Decide what variables your program needs, and create them with appropriate initial values.

(Please use Python for begginners and I am learning)

We have learned For x in range

I have this code so if you could correct it with comments that would be awesome!

#define variables

n1 = 0

n2 = 0

n3 = 0

average_grade = (n1 + n2 + n3)/3

#Get 3 integer from user

n1 = int (input ("please enter first grade: "))

n2 = int (input ("please enter second grade: "))

n3 = int (input ("please enter third grade: "))

#Calculate Average

for x in (n1, n2,n3):

average_grade

#print result to user

print (average_grade)

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago