Question: PARTICIPATION ACTIVITY 6 . 7 . 1 : Analyzing the eBay fee function. 1 ) For any call to calc _ ebay _ fee (

PARTICIPATION ACTIVITY
6.7.1: Analyzing the eBay fee function.
1)
For any call to calc_ebay_fee(), how many assignment statements will execute?
5
Check
Show answer
Correct
5
The first four assignment statements always execute, and then exactly one branch will be taken, so one more fee = fee +... statement will execute.
2)
What does calc_ebay_fee() return if the sell_price argument is 0.0(show your answer in the form #.#)?
0.5
Check
Show answer
Correct
0.5
fee is first assigned with 0.5. Next, the first branch executes (i.e. sell_price <=50.00), which adds (0*0.13=0) to fee.
3)
What does calc_ebay_fee() return if the sell_price argument is 100.0(show your answer in the form #.#)?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!