conditionals and loops Flashcards

1
Q

T v; F –>

A

if statement

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

break statement to stop the conditional when loops reaches i equal to 4

A

if i==4

break

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

1) T v; 1) F–> 2)

A

if…. else..

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

test if a value (variable “age”) is in a range

A

if (age > 18 && age <25) then…

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

test if a value (variable “age”) is one of two statemens

A

if (age < 18 | | ahe > 25) then…

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

1) T v; 1) F–> 2) T v; F–> 3)

A

if..elif..else

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

T (keeo going); F–> X

A

while..

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

T (keeo going); F–> X BU in a range

A

for each… :

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

range for the loop (increment 1)

A

for i in range (x , y)

print i

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

range for the loop with specific increment z

A

for i in range (x , y, z)

print i

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