Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python question. pls using easily solution Define a function called calculate average that accepts a list as a parameter and returns the average of the

python question. pls using easily solution image text in transcribed
Define a function called calculate average that accepts a list as a parameter and returns the average of the values in the list You may assume that all the values in the list are either integer numbers, floating point numbers, or are strings that represent floating point numbers. The average should be rounded to 2 decimal places and returned as a string with exactiy 2 decimal places HINT: String formatting commands may be useful here- see https://docs python.org/3/library/string html For example: caiculate average(11, '2.0 3.0]) would return the string 2.00 For example: Test Result x = calculate-average([1]) print(type(x)) x - calculate average([1]) print(x) 1.00 x - calculate average (Ie.e, 2.5 print(x) 5)2.50 Answer: (penalty regime: 0.10, 20, 30, 40, 50 %) 1 Idef calculate_average

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions