Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I already made the mean one: def mean(numbers): total = 0 index = 0 while(index total = total + numbers[index] / len(numbers) index += 1

image text in transcribed

I already made the mean one:

def mean(numbers):

total = 0

index = 0

while(index

total = total + numbers[index] / len(numbers)

index += 1

return total

having trouble plugging it in, Python 3 please.

Variance Function name is variance It takes a list of numeric values (integers or floats) as argument: numbers It calculates the variance of the values in numbers by: calculating the mean (call the function you created to calculate mean) summing the squares of the difference between each value in numbers and the meancreate a total variable, in a while loop add to total the squared difference between each value and the mean dividing the sum of squares (previous step) by the number of items in the list numbers minus 1 It returns the result as a float rounded at two decimals Standard Deviation Function name is sd It takes a list of numeric values (integers or floats) as argument: numbers It calculates the standard deviation of the values in numbers by: calculating the variance (use the function you wrote) taking the square root of the result in the previous step It returns the result as a float rounded at two decimals Range Function name is list_range It takes a list of numeric values (integers or floats) as argument: numbers It finds the lowest and highest numbers in the numbers argument It returns the difference between the highest and lowest number (that is the range) Do not use built-in functions max, min and range

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

LO32.4 Explain the factors that cause changes (shifts) in AS.

Answered: 1 week ago