Conditionals 3 - logical operators


examples


Classwork

In a text document:

Using a single if using logical operators, check for the following situations.  First think about input, including variable names and types; prompt the user for input. Then just print a statement about what happened.

  1. Teens between 12 and 18 who have had a flu shot can attend the presentation.
  2. Our apartment complex allows up to 2 cats or 1 dog as long as it is under 25 pounds
  3. Run the dishwasher if it has more than 25 items, or else has 1 or more items and has not been run for three days