The toll program illustrates the use of conditional statements;
As a general rule, conditional statements are used to make decisions
<h3>The
toll program</h3>
The toll program written in Python where conditional statements are used to make several decisions is as follows:
def calc_toll(hour, morning, weekend):
toll_fee = 0
if weekend == False:
if morning == True:
if hour < 7:
toll_fee+=1.15
elif hour < 10:
toll_fee+=2.95
elif hour <= 12:
toll_fee+=1.90
else:
if hour < 3:
toll_fee+=1.90
elif hour < 8:
toll_fee+=3.95
elif hour >= 8:
toll_fee+=1.40
else:
if morning == True:
if hour < 7:
toll_fee+=1.05
elif hour <= 12:
toll_fee+=2.15
else:
if hour < 8:
toll_fee+=2.15
elif hour >= 8:
toll_fee+=1.10
return toll_fee
Read more about conditional statements at:
brainly.com/question/24833629
#SPJ1
Answer:
The answer is "Option b"
Explanation:
In the given code three-class C1, C2, and C3 are declared, in which C2 and C3 extend the class C1. In the next line, C2 and C3 object are created, that is c2 and c3. and in the last line c2 class object holds two-class C2, C1, and one object c3 value, this code will give runtime error because it can't cast object from sibling class, and wrong choices can be defined as follows:
- In option a, It is not correct because it can't cast c3 object into c2 object.
- In option c, It is not correct because it performs multiple casting in nested forms.
- In option d, It is wrong because the statement is not correct.
It is a Peer-to-peer type of network when you have implemented a network where each device provides shared files with all other devices.
So the answer is Peer-to-peer.
A 150-megawatt solar power plant.