Answered step by step
Verified Expert Solution
Link Copied!

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 1,2,3,4, and 5.
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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions