Back to Freecodecamp

Task 23

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

latest1.9 KB
Original Source
<!-- (audio) Sophie: You could have added a comment explaining why you chose a particular loop structure. -->

--instructions--

Listen to the audio and answer the question below.

--questions--

--text--

What comment should Mark have added?

--answers--

A comment saying the loop does not work.

--feedback--

Sophie doesn't mention a comment saying if the loop works.


A comment asking someone else to fix the code.

--feedback--

There was no need to ask for help.


A comment saying comments are not important.

--feedback--

Comments are useful for understanding the code.


A comment explaining why he chose a particular loop structure.

--video-solution--

4

--explanation--

To find the correct answer, focus on how Sophie gives feedback.

She says explaining why you chose a particular loop structure. this shows that she isn't saying the loop is wrong — just that the decision behind it should have been explained.

This helps others understand the thinking behind the code, which is why comments are useful.

--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": 31.84,
      "finishTimestamp": 35.12
    }
  },
  "commands": [
    {
      "character": "Sophie",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Sophie",
      "startTime": 1,
      "finishTime": 4.28,
      "dialogue": {
        "text": "You could have added a comment explaining why you chose a particular loop structure.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "opacity": 0,
      "startTime": 4.78
    }
  ]
}