Question: PLEASE USE PYTHON A dog sitter is open for business from 7:00 am until 10:00 pm. She charges $4.75 per hour from 7:00 am until

PLEASE USE PYTHON PLEASE USE PYTHON A dog sitter is open for business from

A dog sitter is open for business from 7:00 am until 10:00 pm. She charges $4.75 per hour from 7:00 am until 5:30 pm. From 5:31 pm until 10:00 pm the rate is $3.50 an hour. These rates are per dog, and she does not dog sit before 7:00 am or after 10:00 pm. Partial hours are prorated. Define a function named q2() that accepts the number of dogs (an integer), a starting time (string) and ending time (string) and calculates the total dog sitting bill. Assume that the starting and ending time strings are in 24hour format, meaning that the string "07:00" would indicate 7 am and the string "15:30" would be 3:30 pm. Some example calculations: # Dogs Start Time End Time Total 08:30 11:15 07:00 17:00 18:30 20:10 41.00 99.56 118.42 NOTE: the function should return the total rate as a Float value with 2 decimal places; it should not print it

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!