Flashcards
Repetition/Iteration (Loops)
Cards in this deck (9)
- 1What are the three types of Loop?While
Until
For - 2What does a While Loop look like?Local i
Put 1 into i
Repeat While i < 10
add 1 to i
answer i
End Repeat - 3What does a Until Loop look like?Local i
Put 1 into i
Repeat Until i = 10
answer i
Put 1 into i
End Repeat - 4What is a benefit of a For Loop?Nearly impossible to create a infinite loop
Automatic counter
Useful for when we know how many times we want the loop to run - 5What does a For Loop look like?Local i
Repeat with i = 1 to 10
answer i
End Repeat - 6What is different about a Advanced For Loop?Involves Steps
e.g.
Repeat with i = 10 to 100 step 10 - 7How do you create a For Loop which steps backwards?Repeat with i = 100 to 1 step -1
- 8Can you create Nested.. a) For Loops b) While Loops c) Until Loopsa) Yes
b) Yes
c) Yes - 9Example of a While Loop using Logical OperatorsWhile i > 10
//do something//
Information
- Description
- A Level Computing (F452) Flashcards on Repetition/Iteration (Loops), created by Molly Hills on 25/11/2014.
- Created by
- Molly Hills
- Views
- 13
- Tags
- Rating