Join free to take this lesson
Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.
13 steps ยท about 20 min
By the end you can
- Write a for loop with range, and indent its body
- Say which numbers range(n) and range(a, b) give
- Use range(1, n + 1) to count from 1 to n
- Use the loop's number in a formula
- Tell a line inside the loop from a line after it
Who it is for: After lesson 2.2: you can write an indented body.
The steps
- Three times
- for: once for each number
- range(5) is 0, 1, 2, 3, 4
- range(4)
- Run a loop
- Count further
- range(1, n + 1): from 1 to n
- Seconds 1 to 10
- Use t in the body
- Speeds of a falling stone
- After the loop
- How many times?
- range in your own words
Discussion 0 comments
Log in to join the discussion.