Functions Warm Up#
Warm Up Question-1#
Write a function that takes a number as a parameter and returns the last digit of this number.
Hint: Use the modulus operator (%) to get the last digit.
Print the output of this function when the input is 234.
Warm Up Question-2#
Write a function that takes a number as a parameter and returns the following: \(\frac{4x^2-2x+5}{x^3-4x}\)
Print the output of this function when the input is 5.
Warm Up Question-3#
Write a function named lb_g that takes a parameter lb representing a weight in pound and returns its equivalent value in grams (g).
1 lb = 453.592 g
Print the output of this conversion function when the input is 200 pounds.
Warm Up Question-4#
Write a function named support that prints “Applause!” each time it is called.
Call the function two times and display its output.
Warm Up Question-5#
Write a function that takes two integer parameters: x and y.
The default value of y is 10.
The function should return the product of these two numbers.
Call the function both with and without providing a value for y.