Computer Science, asked by abdullah123khawaja, 1 year ago

Which one is NOT a legal variable name?
1 point
A)_myvar
B)my-var
C)MyVar
D)My_Var

Answers

Answered by himmatbhavana
18

Answer:

Myvar is not legal variable name

Answered by letmeanswer12
2

"Option B: my-var is not a legal variable name".

Variable name:

In python, a variable name must start with an alphabetic or the underscore character. Variable names in python cannot start with a digit. Variable names in Python can have any length and also consist of uppercase and lowercase in names.

Python variable name consists of an alphabetic letter, underscores, number, and only. For example, myVar, MyVar, _myVar, MyVar123 are the valid variable names in python, but m*var, my-var, and 1myVar are invalid variable names in python.

Similar questions