Variables in programing language

Variables



In programming language,  Variable is a name which is given to a memory location where the data is being stored.

For example: Suppose in our kitchen we have different container for storing things such as - Daal, Sugar, Salt, etc. and we put name sticker on containers. So container will memory location and name on container is variable name and item in container is our data.



Things to remember :

  • Variable name cannot be start with a number (for ex: 5T- this is wrong way) , It always start with an alphabet. such as A2, box1, M16A. These are correct way.
  • We cannot put spaces between variables , but we can put underscore for example: Player_Name, Roll_no, etc.
  • We cannot put any symbol or full stop or coma in variable name.

We can declare variables (means creating a variable) in like this:
A= 25
Name = James
Exam_score= 13

This is a python code for declaring a variable----


ENJOY! ENJOY! ENJOY! ENJOY! ENJOY!

Post a Comment

0 Comments