0
0
Intro to Computingfundamentals~10 mins

Conditional logic (if-then decisions) in Intro to Computing - Draw & Build Visually

Choose your learning style9 modes available
Draw This - beginner

Draw a flowchart to decide if a person can enter a club based on their age. The rule is: if the person is 18 years or older, they can enter; otherwise, they cannot enter.

5 minutes
Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Grading Criteria
Start and End symbols present
Input symbol used to get age
Decision diamond correctly checks 'Is Age >= 18?'
Two distinct paths for Yes and No decisions
Outputs clearly labeled 'Allow Entry' and 'Deny Entry'
Flow lines correctly connect all symbols
Solution
  _______
 /       \
|  Start  |
 \_______/
     |
     v
  ___________
 | Input Age |
  -----------
     |
     v
  _______________
 | Is Age >= 18? |
  ---------------
     |Yes          |No
     v             v
  ___________   ____________
 | Allow Entry| | Deny Entry |
  -----------   ------------
     |             |
     v             v
  _________     _________
 |  End    |   |  End    |
  ---------     ---------

This flowchart starts with the Start symbol. Then it takes the person's age as input. Next, it uses a decision diamond to check if the age is 18 or more.

If the answer is Yes, the flow goes to the Allow Entry output, then ends.

If the answer is No, the flow goes to the Deny Entry output, then ends.

This shows a simple if-then decision: if age is 18 or older, allow entry; else, deny entry.

Variations - 2 Challenges
[intermediate] Draw a flowchart to decide if a person can enter a club based on their age and membership status. Rule: If the person is 18 or older and is a member, they can enter; otherwise, they cannot enter.
[advanced] Draw a flowchart to decide ticket price based on age: if age is less than 12, price is $5; if age is between 12 and 64, price is $10; if age is 65 or older, price is $7.