Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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