Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON QUESTION!!!HELP!!! Below is a program that uses a function to compute the cost of leaving dogs at Joey's Doggy Day Care There is cost
PYTHON QUESTION!!!HELP!!!
Below is a program that uses a function to compute the cost of leaving dogs at Joey's Doggy Day Care There is cost per dog that is charged daily 1 def day_care cost (number of_dogs, number.of days, price-per_dog): 3 Computes the total cost of a stay at Doggy Day Care 4 6 8 number_of dogs the number of dogs number_of days duration of stay in days price per dog cost for a single dog in dollars Returns total cost of the stay 10 12 13 daily-dog-cost = number-of-dogs * price-per-dog total-cost = daily-dog-cost * number-of-days return total_cost 15 |# compute the cost of a stay for 3 dogs 16|# staying 7 days at a rate of $49.50 per dog 17 first stay day care_cost (3, 7, 49.50) 18 19|# compute the cost of a stay for 10 dogs 20 |# staying 3 days at a rate of $19.75 per dog 211 second-stay day-care-cost (10, 3, 19.75) = 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 neither arguments or parameters. (d) What is the scope of i. daily_dog_cost ii. number_of_days ii. first stay (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 first_stay and second stay when the program endsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started