Back to Freecodecamp

Task 9

curriculum/challenges/english/blocks/learn-about-speculation-and-requests/67ee59328c8fd111948893bd.md

latest1.9 KB
Original Source
<!-- (audio) Sophie: You used a simple for loop, but given our use case, you should have used a while loop instead. -->

--instructions--

Listen to the audio and answer the question below.

--questions--

--text--

What did Mark do wrong?

--answers--

He didn't use any loop.

--feedback--

Mark used a loop, but he did something wrong.


He used a while loop instead of a for loop.

--feedback--

Mark didn't use a while loop.


He used a for loop instead of a while loop.


He removed all loops from the code.

--feedback--

Sophie doesn't mention that Mark removed all loops.

--video-solution--

3

--explanation--

Sophie says, You should have used a while loop.

Should have + Past Participle is used to talk about a mistake or something that should have been done differently. For example:

  • I should have studied more for the test. - You didn't study enough, and that was a mistake.

  • You should have called me earlier. - Someone didn't call you earlier, and you think they should have.

--scene--

json
{
  "setup": {
    "background": "company2-center.png",
    "characters": [
      {
        "character": "Sophie",
        "position": {
          "x": 50,
          "y": 0,
          "z": 1.4
        },
        "opacity": 0
      }
    ],
    "audio": {
      "filename": "B1_17-1.mp3",
      "startTime": 1,
      "startTimestamp": 12.0,
      "finishTimestamp": 16.36
    }
  },
  "commands": [
    {
      "character": "Sophie",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Sophie",
      "startTime": 1,
      "finishTime": 5.26,
      "dialogue": {
        "text": "You used a simple for loop, but given our use case, you should have used a while loop instead.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "opacity": 0,
      "startTime": 5.76
    }
  ]
}