Question: Python 3.0 via PyCharm Purpose: To distinguish between the different parts of functions and function calls. Degree of Difficulty: Easy Below is a program that
Python 3.0 via PyCharm

Purpose: To distinguish between the different parts of functions and function calls. Degree of Difficulty: Easy Below is a program that uses functions to compute the total cost, including tax, of a purchase of several blankets 1 def add tax (subtotal): 2 3 4 5 6 3 Adds 5% tax to the subtotal input subtotal is the amount before tax returns total the amount including tax totalsubtotal + 0.05* subtotal return total 9 10 def blanket total( number_of_blankets , price_per_blanket): 3 12 13 14 15 16 17 18 19 20 21|# compute the total for a customer who purchases 1 blanket at5 per blanket 22 customer 1 blanket-total (1 , 5) 23 24 # compute the total for a customer who purchases 3 blankets at $4 per blanket 25 customer2blanket_total (3,4) 26 27|# compute the total for a customer who purchases 5 blankets at $6 per blanket 28 customer3 = blanket-total (5,6) Computes the total amount due for the purchase of a number of blankets including 5% tax number_of_blankets is the number of blankets purchased price per.blanket is the price Tor each blanket returns the total for the customer 3 total_before_taxnumber_of_blankets * price_per_blanket return add_tax (total_before tax) Answer the following questions. Refer to line numbers if you find it helpful in your answers. (a) List all of the function arguments in this program. (b) List all of the function parameters in this program (c) List all of the variables that are not arguments or parameters (d) What is the scope of the folowing variables: i. number of blankets ii. total ll. customer1 iv. total before tax (e) How many function definitions are in this program? (f) How many function calls are in this program? (g) What are the values referred to by customer1 and customer2 when the program ends
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
