Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

11) Idea: Define a function to compute a decimal number. # Define a function average to compute the average value of a list # of

11) Idea: Define a function to compute a decimal number.

# Define a function average to compute the average value of a list # of decimal numbers. # Given a list of decimal numbers, it returns the average of # the numbers.

# Your function must work with both of these test cases. weight_list = [91.2, 178.5, 220, 121.5]

ave_weight = average(weight_list)

print(ave_weight, type(ave_weight)) # type should be float

distance_list = [100.1, 65.7, 5000.79]

average_distance = average(distance_list)

print(average_distance, type(average_distance)) # type should be float

Using Python programming

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

What attracts you about this role?

Answered: 1 week ago

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago

Question

Different types of Grading?

Answered: 1 week ago