Loops Flashcards

1
Q

For Loop

A

A loop control structure that runs a block of code a predetermined number of times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

While loop?

A

A loop control structure that runs a block of code until a certain logical expression is satisfied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Range(1,11)

A

Incluye el primer número del rango, pero excluye el último. En este caso: 1,2,3,4,5,6,7,8,9,10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

range(5)

A

0,1,2,3,4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

range(0,5)

A

0,1,2,3,4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

range (0,10,2)

A

0,2,4,6,8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

range(10,1,-1)

A

10,9,8,7,6,5,4,3,2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

for-each loops

A

Skip over the indices: you don’t have manually pull the values out, but you don’t have access to the indices either.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

For-Each Loop

A

A loop control structure that runs a block of code a predetermined number of times, where number of times comes for the length of some lists and the items in the list are automatically loaded onto a variable for usage in the block code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

range(-5)

A

No answer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly