Question: Write a Python file ( ending in . py ) that performs the following steps: Creates a list variable containing the numbers 1 , 2
Write a Python file ending in py that performs the following steps:
Creates a list variable containing the numbers and
Sums the entries in the list by accessing them individually using indices; do not use the sum function here
Stores the result of the sum in variable named avg.
Uses the combined assignment operator to divide avg by the number of entries in the list, thereby storing the average in avg.
Uses print avg to display the result.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
