Question: Python: NOTE: You will write test cases and print their results in your file to test your code, but the file you submit must have

Python: NOTE: You will write test cases and print their results in your file to test your code, but the file
you submit must have all print ()(and any input ()) statements commented out! The
version that you submit to GradeScope, should not "do" anything. It only contains function
definitions.
You cannot use any functions not covered in class. Using a forbidden operators will result in
zero points for that task.
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
cmtoin(25.4)10.0
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
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.
avgsix(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: 73-3=343-3=340
reliantnum(7,3)340
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
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.
Write a function called determinant () that returns a determinant of a quadratic function,
given the values of a,b,andd c as parameters.
NOTE: determinant (the part under the radical): b2-4ac
determinant (4,7,3)1
Python: NOTE: You will write test cases and print

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!