Question: Problem 13. [ 1 point 1 Define a function greeting that consumes one string argument, name, and no return which simply prints Hello, and the
Problem 13. [ 1 point 1 Define a function greeting that consumes one string argument, name, and no return which simply prints "Hello, and the name provided separated by one space. No docstring required. Test Result greetingC"cat")Hello, cat Problem 14. I 1 point 1 float). No docstring required. For example: Result print(miles to kilometers(1.0)) 1.6 assertEqual (miles to kilometers(10),16.0 assertEqua assertEqual (miles to kilometers(35),56.0 FS to kilometers function: assertEqualcmiles-trei assertEqual(miles to ki Loneters(15),24.0 assertEqual (miles to kilometers(35),56.0 s(10),16.0 Problem 15. I 1 point 1 Define a function multiply which consumes two arguments. The function should return the values of the For example: Result print multiply(3,2)) print(multiply(0.5,4.5) 2.25 Use assertEqual(multiply(3,2),6) assertEqual(multipl16,-1)-10 assertEqual multiply0.5,4.5),2.25) Now that we've defined some simple functions, we are going to follow the steps in the Design Recipe to de the functions in this assignment. Now that we've defined some simple functions, we are going to follow ie steps in the Design Recipe to develop the rest the functions in this assignment. Problem 16. 1 point for correctness-1 point for Test Cases Graded by TAs Use the Design Recipe to define a function that calculates the area of a right triangle. This function should have two parameters: the triangle height and the triangle base length, both floats Return the area of the (hangle. Do not use round inside your function! The function header should look like this: def calculate triangle area(height, base) Computes the area of a triangle given its height and base lengths height: (float) length of the triangle's height base: (float) len of the triangle's base Returns: orea of the triangle: (float) calculate triangle area can be tested using the following 3 tests assertEqual Cround(calculate. triangle ar assertEqualCroun(calculate triangl 2:3:.6. 01, 5000.32),5),2.5e816) Enter 3 other 42.05 not 42.053) abl 1 point for T minute, as a float. Don't forget to convert seconds to minutes! Include a Docstring. (both ints). The function should return the puise rate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
