0
0
Intro to Computingfundamentals~10 mins

Algorithm design (planning solutions) in Intro to Computing - Draw & Build Visually

Choose your learning style9 modes available
Draw This - beginner

Draw a flowchart to plan an algorithm that finds the largest of three numbers: A=15, B=23, C=8.

10 minutes
Hint 1
Hint 2
Hint 3
Hint 4
Grading Criteria
Start and End symbols present
Input step clearly shown
Decision diamonds used for comparisons
Correct comparison order (A vs B, then C vs Max)
Max variable updated correctly
Output step to display largest number
Flow lines correctly connect all steps
Solution
  +-------+
  | Start |
  +-------+
      |
      v
  +---------------------+
  | Input A=15, B=23, C=8 |
  +---------------------+
      |
      v
  +-----------------+
  | Is A > B?       |<-------------------+
  +-----------------+                    |
     /       \                          |
   Yes       No                         |
   /          \                        |
  v            v                       |
+---------+  +---------+               |
| Max=A   |  | Max=B   |               |
+---------+  +---------+               |
      |          |                     |
      +----------+---------------------+
                 |
                 v
         +-----------------+
         | Is C > Max?     |<----------------+
         +-----------------+                 |
            /        \                       |
          Yes        No                      |
           /          \                      |
          v            v                     |
     +---------+  +---------+                |
     | Max=C   |  | Max=Max |                |
     +---------+  +---------+                |
           |          |                      |
           +----------+----------------------+ 
                      |
                      v
               +--------------+
               | Display Max  |
               +--------------+
                      |
                      v
                 +-------+
                 | End   |
                 +-------+

This flowchart starts by taking three numbers A=15, B=23, and C=8 as input.

First, it compares A and B using a decision diamond. If A is greater than B, it sets Max to A; otherwise, Max is set to B.

Next, it compares C with the current Max. If C is greater, Max is updated to C; otherwise, Max remains the same.

Finally, the flowchart displays the largest number stored in Max and ends.

This step-by-step comparison ensures the largest of the three numbers is found correctly.

Variations - 2 Challenges
[beginner] Draw a flowchart to find the smallest of three numbers: A=12, B=7, C=19.
[intermediate] Draw a flowchart to find the largest of four numbers: A=10, B=25, C=17, D=22.