Question: Problem 3.) You are writing a function for a truck rental company. The company charges $20.99 per dayand$D2 per mile driven. The user needs to

 Problem 3.) You are writing a function for a truck rental

Problem 3.) You are writing a function for a truck rental company. The company charges $20.99 per dayand$D2 per mile driven. The user needs to input the number of days of rental and the the total miles driven. The function should return two variables: total cost and daily averaqe. The total cost is the total the truck renter will pay. The daily average is the cost averaged across the number of days of rental. Complete the function so that these two variables are computed NOTE: The return statement here does two things. First, it rounds total_cost and daily_average to two decimal places... the nearest penny. Also, it returns two values, separated by a comma. This return type is a tuple. With two elements being returned, the output is what we think of as ordered pairs in mathematics. 57]: def truck_cost (days, miles): #TYPE YOUR CODE HERE x- miles y= days return round = 0.29x + 20 . 99y return round(total_cost, 2), round(daily_average, 2) File "", line 6 return round-.29x 20.99y SyntaxError: invalid syntax

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!