Skip to the lesson

CodingLesson 4 of 6

Part 1 of 3, 0 done

14 min

Loops: working through the order queue

The boba shop's screen fills with orders after school. One short loop makes every drink once, and one wrong number skips a customer or crashes the screen.

Ticket 01 · The guess

How many fence posts?

The construction company is building a straight fence 100 ftexample (example number: Simplified example: the fence's length.) long, with a post every 10 ftexample (example number: Simplified example: space between posts.), including one at each end. How many posts does it need?

15 posts
5 posts20 posts
Words to know

Spot something wrong?

Tell us what looks off. No name or email needed.

What kind of problem?

0 / 1000

We'll also send this page, the lesson, ticket 1, so we can find it. Nothing else. Privacy

·
Sources and every number

Every number

  • 100 ftexample (example number: Simplified example: the fence's length.) · Simplified example: the fence's length.
  • 10 ftexample (example number: Simplified example: space between posts.) · Simplified example: space between posts.
  • 11 postsexample (example number: Worked out: the length divided by the gap gives the gaps, plus one more post.) · Worked out: the length divided by the gap gives the gaps, plus one more post.
  • 10 postsexample (example number: Worked out: the length divided by the gap, the number of gaps (the common wrong answer).) · Worked out: the length divided by the gap, the number of gaps (the common wrong answer).
  1. Lessons›
  2. The school›
  3. Coding
  • ·Before this: If the cart is fifty dollars or more: business rules
  • ·Next: Functions: one rule for the whole crew
Skip to the lesson

CodingLesson 4 of 6

Part 1 of 3, 0 done

14 min

Loops: working through the order queue

The boba shop's screen fills with orders after school. One short loop makes every drink once, and one wrong number skips a customer or crashes the screen.

Ticket 01 · The guess

How many fence posts?

The construction company is building a straight fence 100 ftexample (example number: Simplified example: the fence's length.) long, with a post every 10 ftexample (example number: Simplified example: space between posts.), including one at each end. How many posts does it need?

15 posts
5 posts20 posts
Words to know

Spot something wrong?

Tell us what looks off. No name or email needed.

What kind of problem?

0 / 1000

We'll also send this page, the lesson, ticket 1, so we can find it. Nothing else. Privacy

·
Sources and every number

Every number

  • 100 ftexample (example number: Simplified example: the fence's length.) · Simplified example: the fence's length.
  • 10 ftexample (example number: Simplified example: space between posts.) · Simplified example: space between posts.
  • 11 postsexample (example number: Worked out: the length divided by the gap gives the gaps, plus one more post.) · Worked out: the length divided by the gap gives the gaps, plus one more post.
  • 10 postsexample (example number: Worked out: the length divided by the gap, the number of gaps (the common wrong answer).) · Worked out: the length divided by the gap, the number of gaps (the common wrong answer).
  1. Lessons›
  2. The school›
  3. Coding
  • ·Before this: If the cart is fifty dollars or more: business rules
  • ·Next: Functions: one rule for the whole crew