About for

7 important questions on About for

What are the most recent values in these codes?

1   distance = 0
distance = distance +1   


2  for w in words:
           print(w)

1 . Distance represents the most recent value of distance.
2. W in this program, represents the most recent value of the list with words.

Where can the function range() be used for?

To be used in a for  loop indicating how many times you want to iterate.

What roles of variables have been discussed?

- Fixed value
- Most-recent holder
- Stepper
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What does a stepper do?

A stepper iterates through a list of numbers that we know beforehand. For example the i over a range in an f-string. A stepper can have any variable that iterates through a list of numbers that we know beforehand.

What does the continue statement do?

Continue skips an item of the list under a certain condition. You can read continue as 'skip'

In what ways is skipping an element in a list prossible?

- Using continue
- Using if statement and the reverse condition

What are some properties of the loop variable?

- Holds the value of each element in the list in turn.
-Always plays the most-recent holder role.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo