Variables in python 3.

Variables in python 3.

·

1 min read

Day 2

Variable:

A variable lets you store a value by assigning it to a name. The name can be used to refer to the value later in the program.

For example, in game development, you would use a variable to store the points of the player. What’s the point of playing if you don’t know who’s winning right!

To assign a variable, use one equals sign

Screen Shot 2022-04-01 at 19.06.51.png

--> Naming your variables is pretty flexible. You can use letters, numbers, and underscores in variable names. But you can’t use special symbols, or start the name with a number.

Screen Shot 2022-04-01 at 19.09.14.png

Quick Test! :)

Which of the following is a good variable?

1) This is @ variable/?

2) This_is_a_variable

3) 123

Comment down below!! :)