Computer Science, asked by FreePoints1345, 4 months ago

What are variable ? What are the rules for naming a variable?​

Answers

Answered by Braɪnlyємρєяσя
3

the rules and conventions for naming your variables can be summarized as follows:

variable names are case-sensitive. ...

subsequent characters may be letters, digits, dollar signs, or underscore characters. ...

if the name you choose consists of only one word, spell that word in all lowercase letters.

Answered by Anonymous
21

Answer:

\large\mathsf{\underline\green{Answer:-}}

• What are Variables?

\large\mathsf{\underline\red{Solution:-}} Variables are the named memory location created in the main memory of computer , used to store data. During the program execution , this location are created and identified by the name given by the user. Using variables, Values are stored and manipulated to produce the desired results.

• What are the Rules for Naming Variables?

\large\mathsf{\underline\red{Solution:-}} To form valid variable name is python, you should always follow certain rules for naming variable. These rules are as follow:

☞ Variable name should be meaningful so that they are easy to remember too.

☞ Variable name can be of any size.

☞ Variable name can have characters a-z, A-Z, 0-9 and Underscore(_).

☞ Variable name should begin with the letter or underscore.

☞ Variable name are case sensitive. e.g. 'total' and 'TOTAL' are not same.

☞ always remember that variable name should be a keyword such as else, print, if, etc.

Similar questions