/ Homework Answers / Accounting / Question 1) List all of
Not my Question
Flag Content

# Question

Question

1) List all of the function arguments in this program

2) List all of the function parameters in this program

3) List all the variables that are not arguments or parameters.

4) What is the scope of I) number_of_trial_days. II) total_cost. III) cost1

Below is a program that uses a function to compute the cost of hiring an attorney from Wright & Co law office, which is priced in dollars. 1 def cost-of-attorney number-of-trial-days price-per-day number-of-witnesses, price-per-witness) Computes the cost of an attorney which is in dollars number-of-trial days the number of days the trial lasts price-per-day cost of an attorney working for 1 day, in dollars number of witnesses how many witnesses need to be cross-examined during the trial price per witness price of an attorney per witness that needs to be cross examined in dollars Returns total cost of an attorney 14 total-cost-per-day number-of-trial days price-per-day total witness cost number of witnesses witness 17 total cost total cost-per-day total witness cost return total cost 20 a compute the cost of a trial that lasts 2 days 21 each day costs 600\$ there are 3 witnesses and it costs 100 per witness 22 cost cost-of-attorney (2 600 3, 100 24 compute the cost of a trial that lasts 9 days 25 each day costs 400\$ there are 13 witnesses and it costs 100\$ per witness 26 cost cost-of-attorney (9 400 13 100) 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 i. number-of-trial-days total cost iii, cost (e) How many function definitions are in this program? (g) What are the values referred to by cost 1 and cost2 when the program ends?

## Solution 5 (1 Ratings )

Solved
Accounting 2 Weeks Ago 151 Views