What is / how do I invoke a variable in Python?

1) Think of a variable in Python or programming like a basket. I can put anything inside the basket I want. We also need to give a label to our basket and give it a name, and to separate it, so there are 3 parts to a variable.

image template.PNG

2) Variables have 3 parts. The name on the left, an equals sign in the middle and whatever is in the variable on the right.

image template.PNG

**Note: We do not use capital letters OR spaces in variable. The only spaces are between the equals sign and items.

3) Look at this example, on the left side, the variable name is "move" on the right hand side whats inside is the integer 5.

image template.PNG

4) Here is another example. The name on the left is called myName and the right hand side is the name, Mr. Cooper.

image template.PNG

*When creating a variable when writing words (that are in the variable) they go in quotes, always!

5) Here are a bunch of variables! They typically are the first thing you write in Python. They usually are very close to the top. You write as many as you need for your program.

image template.PNG

image template.PNG

image template.PNG

image template.PNG

image template.PNG

image template.PNG