lesson 7 Flashcards
A flowchart is a…
In coding, flow diagrams are used to …
a diagram of steps, in order, that needs to be followed.
describe process steps with the use of specific blocks
All of the most important information of a process is represented in the flow diagram including any and all…
inputs, outputs, functions, decisions, loop and IF statements
Flow diagrams are used to …
simplify a process into the most important steps
help to organise the logic behind the flow of information
A loop in programming language refers to …
a function that repeats a statement or condition multiple times depending on the specified boundaries
few examples that use loops to perform a function
Traffic lights
social media
multiplayer games
… uses loops to constantly …
social media like WhatsApp
refresh and retrieve messages
how do you exit a forever loop…
red button on the Arduino has to be pressed
the Arduino is plugged out to stop the code from running
2 types of loops
for loop (also known as the forever loop)
a while loop.
look at page 4 figure 7.5
The main difference between a “for” loop and “while” loop is that …
the “for” loop requires a known number of repeats
the “while”loop does not require this knowledge
An infinite loop refers to a loop that …
will repeat forever, which will cause lagging or freezing of the affected system.