Answered step by step
Verified Expert Solution
Question
1 Approved Answer
''' Edit the Python script named assignment1.py in the assignment1 directory. This script should compute the mean of a list of integers, but is incorrect.
'''
Edit the Python script named assignment1.py in the assignment1 directory. This script should compute the mean of a list of integers, but is incorrect. Fix the errors in the script so that the mean is computed correctly.
'''
L = [40, 35, 49, 53, 38, 39, 40, 37, 49, 34, 38, 43, 47]
n = len (L)
i = 1
total = 0
while i <= n:
total += L[i]
i += 1
avg = total // n
print ('the average is: ', avg')
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started