Draw This - beginner
Draw a flowchart that repeats the action of printing numbers from 1 to 5 using a loop.
7 minutes
Hint 1
Hint 2
Hint 3
Draw a flowchart that repeats the action of printing numbers from 1 to 5 using a loop.
+---------------------+
| Start |
+----------+----------+
|
v
+---------------------+
| Set number = 1 |
+----------+----------+
|
v
+---------------------+
| Is number <= 5? |<----------------+
+----------+----------+ |
| Yes |
v |
+---------------------+ |
| Print number | |
+----------+----------+ |
| |
v |
+---------------------+ |
| number = number + 1 | |
+----------+----------+ |
| |
+---------------------------+
|
v
+---------------------+
| End |
+---------------------+This flowchart starts by setting a variable number to 1.
It then checks if number is less than or equal to 5.
If yes, it prints the current number, then adds 1 to number.
The flow returns to the decision to check the condition again.
When number becomes 6, the condition fails and the flowchart ends.
This repeats the print action 5 times, printing numbers 1 through 5.