Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 1.2 KB

File metadata and controls

25 lines (15 loc) · 1.2 KB
tutorial https://www.youtube.com/watch?v=dWWvZkaPwDw

02 Declare Variables

In programming, we use variables like boxes (or containers) to store different kinds of information. Here is how to create a variable:

name = "Daniel"

In this example, name is the variable, acting like a box to store the value "Daniel". Inside this 'box', we are storing the value "Daniel", and we can use name to refer to it later. When naming your variables, you can choose almost any name, but it must begin with a letter or an underscore (_). It's helpful to pick a name that describes what is inside the 'box' so you can easily understand what it represents later on.

📝 Instructions:

  1. Declare a new variable named name with the string value "Yellow" and print the value to the console.

  2. Then, print its value on the console using print(name).

💡 Hints:

  • The variable's name must be name to pass the tests, and the value inside has to be the string "Yellow".

  • If you need further explanation on what strings are and how they work in Python, you can watch this clip: https://youtube.com/clip/UgkxyQ_JLmgSUL4l25c8Ly7cCRvk1Gm-EchU (ctrl + click on the link to open the video)