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:

  1. Whether they are travelling at a time of day when tolls are being assessed.
  2. Whether tolls are being assessed in the direction in which they are traveling.
  3. Whether they would have to pay tolls.
  4. 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

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!