While loops, constant, and counters Flashcards

1
Q

What are constants?

A

Constants never change during a program. They are declared with all caps.

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

What are the loop types?

A

Infinite loops, counted loops, and conditional loops.

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

What is an infinite loop?

A

An infinite loop uses While True:

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

What is a counted loop?

A

A counted loop uses for _ in range():

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

What is a conditional loop?

A

A conditional loop uses While (condition):

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

When do you need to declare a counter?

A

In a conditional loop.

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