Flowchart Conditionals - Activity

Flowchart Conditionals

Make sure you attempt the activity on your own before checking out the solution.

Instructions:

Imagine you are building a website for a wine distributor. Legally you need to ask a user's age before you allow them into your site.

Using a pencil and paper or a flowcharting software, design the following program:

  1. A program that, when a user clicks a button, takes in a users age and checks to see if they are 21 or over.
  2. If they are, display "Welcome to our online store".
  3. Otherwise, display "You must be 21 or older to enter".
Solution flowchart conditionals
**All** programming problems essentially can be broken down into these components \(plus 1 or 2 more\): 1. booleans 2. numbers 3. strings 4. arrays 5. loops 6. arithmetic operators 7. accessors like `[]` 8. conditionals/comparator operators 9. event listeners