The program is an illustration of functions
Functions are named program statements that are executed when called
The program written in Python, where comments are used to explain each line is as follows:
#This defines the function
def toll_fee(time,weekday,weekend):
#This determines the toll fee for weekdays
if(weekday):
if time < 7:
return 1.15
elif time>=7 and time <10:
return 2.95
elif time>=10 and time <15:
return 1.90
elif time>=15 and time <20:
return 3.95
else:
return 1.40
#This determines the toll fee for weekends
elif(weekend):
if time < 7:
return 1.05
elif time>=7 and time <20:
return 2.15
else:
return 1.10
#This calls the toll fee function
print(toll_fee(8, True, False))
Read more about functions at:
https://brainly.com/question/16397886