Back to Freecodecamp

Task 21

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

latest2.0 KB
Original Source
<!-- (audio) Sophie: No problem. You should also remember to use comments in your code. It makes it easier for others to understand what you're doing. -->

--instructions--

Listen to the audio and answer the question below.

--questions--

--text--

Why is it a good idea to use comments?

--answers--

They make the code run faster.

--feedback--

Comments do not affect the speed of the program.


They make it easier for others to understand the code.


They change how the program works.

--feedback--

Comments do not change the logic of the code.


They replace the need for good variable names.

--feedback--

Comments help explain the code, but good variable names are still important.

--video-solution--

2

--explanation--

To find the correct answer, focus on what Sophie says about the purpose of using comments.

She says comments make it easier for others to understand what you're doing. This shows that comments help explain the code to other developers.

Comments do not affect how the program runs or replace good coding practices — they are just there to provide helpful explanations.

--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": 25.54,
      "finishTimestamp": 31.22
    }
  },
  "commands": [
    {
      "character": "Sophie",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Sophie",
      "startTime": 1,
      "finishTime": 6.68,
      "dialogue": {
        "text": "No problem. You should also remember to use comments in your code. It makes it easier for others to understand what you're doing.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "opacity": 0,
      "startTime": 7.18
    }
  ]
}