Question: 1 ) Write a function called cm _ to _ in ( ) that converts a given number of centimeter to inches. The result should

1) Write a function called cm_to_in() that converts a given number of centimeter to inches.
The result should be rounded to the nearest tenth and returned from the function.
NOTE: 1 inch =2.54 centimenters
cm_to_in(25.4)10.0
2) Write a function called rect_perimeter() that returns the perimeter of a rectangle, given
the length and width of a rectangle.
rect_perimeter(4,6)20
3) Write a function called avg_six() which finds the average (mean) of six values given as
parameters. The function should return the average rounded to the nearest tenth.
avg_six(10,10,10,30,30,30)20.0
4) Write a function called reliant_num() that requires two parameters, x and y. and returns a
new value calculated by xy y.
For Example: 733=3433=340
reliant_num(7,3)340
5) Write a function called speaker_price() that calculates and returns the price of a
bluetooth speaker after some discount and then some tax rate. This function requires three
parameters: price, discount percent, and tax rate. NOTE: Calculate the discounted price before
calculating and adding the tax.
speaker_price(100.00,11,7)95.23
6) Write a function called cups_to_sleeves() that calculates how many sleeves of cups Kenia
needs if she can only bring full sleeves. Each sleeve contains 50 paper cups.
HINT: Kenia will likely have extra cups, but should not have more than 49 extra cups!
HINT: You can use math.ceil()(or another approach) to get the result.
cups_to_sleeves(165)4
7) Write a function called determinant() that returns a determinant of a quadratic function,
given the values of a, b, and c as parameters.
NOTE: determinant (the part under the radical): b2-4ac
determinant(4,7,3)1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!