CS 100

Logo

Scientific Computing

Activity 18 - Lists

Create a file gradeAverages.py and copy the following code into it:

def getAverages(myList):
    # FILL IN CODE TO COMPUTE AVERAGE
    return 0


numGrades = input("How many grades? ")
numGrades = int(numGrades)

allGrades = []
for i in range(numGrades):
    # FILL IN CODE TO GET OTHER GRADES
    nextGrade = 0 # what to put?


gradeAverage = getAverages(allGrades)

print("Your grades are: ", allGrades)
print("The grade average is: ", gradeAverage)

If you finish early

Work with your team on a proposal for your final project.

How to submit

Submit your working activity18.py to Moodle.