Question: please write with / in python and take note of restrictions. if both 'tasks' can be answered in one, please do , but otherwise answer

please write with/in python and take note of restrictions. if both 'tasks' can be answered in one, please do, but otherwise answer what is allowed.
Task 3 Learning Objectives:
Using selection statements (if/elif/else)
Defining functions
Using function calls
Using function return statements
Applying arithmetic operators
Assumptions
The data types of the values that are sent to the functions are the proper ones and you don't have to
validate them. Be sure to read additional assumptions made in individual problems!
Restrictions
You may:
Use arithmetic operators: +,-,*,/,//,%
Use Boolean operators and, or,,, etc.
Data types:int, float, str, bool
Casting functions: int(), float(), str(), bool()
You may not:
Import anything.
Use string formatting or string indexing (i.e. string[index]).
Use loops or any other features not covered in class yet. (If you are unsure, ask!)
Use input () or print (). For this assignment you will be defining functions and handling
input/output differently. See the Testing and Functions sections below for more details.
(10 pts) Soraya works as a tour guide in a botanical garden. She gives a garden tour at the top of every hour
throughout the day. Since she has very little time between tours, she has no idea of the time until her shift
is over.
Implement the function hours_worked () that determines how many hours Soraya has worked (garden
tours she has given) from a start hour (int) and an ending hour (int)
Signature:
def hours_worked(start_time, end_time):
#your code here
#return (9,6)9(9,11)2(3,6)3(12,1)1minutespassed (9,15,11,45)150
minutespassed (10,59,12,11)72
minutespassed (4,38,2,2)564
please write with / in python and take note of

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 Programming Questions!