In this video lesson, I show you my solution to the Homework Assignment in Lesson 3. If you were not able to do the homework yourself, you can follow along in the video. Make sure you can do it on your own, without checking back to my solution. You need to understand these basics before moving on the class.
This is my homework solution.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | while True: bucket = 0 numGrades = int(input('How Many Grades do you Have: ')) grades = [] for i in range(numGrades): grade=int(input('Enter Your '+str(i+1)+' Grade ')) grades.append(grade) print('You Entered: ',grade) for i in range(numGrades): bucket=bucket+grades[i] myAverage=bucket/numGrades print('Your Grades Are: ') for i in range(numGrades): print(grades[i]) print('Your Average is: ',myAverage) |