Back to Freecodecamp

Task 29

curriculum/challenges/english/blocks/learn-how-to-use-basic-programming-vocabulary-in-conversations/662b81901b178a0fd33f093c.md

latest2.1 KB
Original Source
<!-- (Audio) Sophie: In Python, you declare variables by using the variable name and the assignment operator. For example, you can declare a variable like this: name = 'Sophie'. -->

--description--

Please answer the question below.

--questions--

--text--

How do you declare a variable in Python according to Sophie?

--answers--

You declare a variable by naming it after an operator.

--feedback--

This choice is incorrect, because the variable is not named after, but before, an operator.


Variables are declared by using a command called declare.

--feedback--

Python does not require a special command like declare to create variables; it uses assignment directly.


You use the variable name followed by the assignment operator and a value.


Variables must be declared by typing variable before the name.

--feedback--

Python does not use any keywords like variable to declare variables. It simply uses the variable name, the assignment operator, and the value.

--video-solution--

3

--scene--

json
{
  "setup": {
    "background": "company2-breakroom.png",
    "characters": [
      {
        "character": "Sophie",
        "position": {
          "x": 50,
          "y": 0,
          "z": 1.4
        },
        "opacity": 0
      }
    ],
    "audio": {
      "filename": "5.1-1.mp3",
      "startTime": 1,
      "startTimestamp": 30.84,
      "finishTimestamp": 39.96
    }
  },
  "commands": [
    {
      "character": "Sophie",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Sophie",
      "startTime": 1,
      "finishTime": 5.78,
      "dialogue": {
        "text": "In Python, you declare variables by using the variable name and the assignment operator.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "startTime": 5.78,
      "finishTime": 10.12,
      "dialogue": {
        "text": "For example, you can declare a variable like this: name = 'Sophie'.",
        "align": "center"
      }
    },
    {
      "character": "Sophie",
      "opacity": 0,
      "startTime": 10.62
    }
  ]
}