Question: Make a decision using Python3 about whether to travel in I-75, a commuter needs to consider: Whether they are travelling at a time of day
Make a decision using Python3 about whether to travel in I-75, a commuter needs to consider:
- Whether they are travelling at a time of day when tolls are being assessed.
- Whether tolls are being assessed in the direction in which they are traveling.
- Whether they would have to pay tolls.
- Whether they are willing to pay tolls.
Your job is to write a program that processes all of this information and makes the decision for a commuter. Here are the rules for making that decision:
- If it is morning rush-hour, then the HOT-lanes are in effect east-bound. This means that a commuter can only take I-75 east-bound if they have three or more people in the car or they're willing to pay the tolls.
- If it's evening rush-hour, then the HOT-lanes are in effect west-bound. This means that a commuter can only take I-75 west-bound if they have three or more people in the car or they're willing to pay the tolls.
- At any other time of day or in any other direction, the HOT-lanes aren't in effect, so the commuter is free to use I-75 with no worries.
**Cannot use if statements**
ex.
Is it rush-hour right now? (morning/evening/no) morning In which direction are you traveling? (east/west) east How many people are in your car? 2 Are you willing to pay tolls? (yes/no) yes You can take I-75: True
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
