Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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
Programming in Python 3 image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions