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 toin that converts a given number of centimeter to inches.
The result should be rounded to the nearest tenth and returned from the function.
NOTE: inch centimenters
Write a function called rectperimeter that returns the perimeter of a rectangle, given
the length and width of a rectangle.
rectperimeter
Write a function called avgsix which finds the average mean of six values given as
parameters. The function should return the average rounded to the nearest tenth.
Write a function called reliantnum that requires two parameters, and and returns a
new value calculated by
For Example:
Write a function called speakerprice 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.
speakerprice
Write a function called cupstosleeves that calculates how many sleeves of cups Kenia
needs if she can only bring full sleeves. Each sleeve contains paper cups.
HINT: Kenia will likely have extra cups, but should not have more than 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 andd c as parameters.
NOTE: determinant the part under the radical:
determinant
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
