what is a variable? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is a variable?

28th Jun 2016, 8:00 AM
Tanvir
Tanvir - avatar
7 Answers
+ 3
A variable is like a container in which you can store values like integers, floats, string etc. Like container, values can be changed whenever needed. You can not define variable name as same as reserved keywords. Variables can only start with characters or underscore, you can use numbers, characters, underscore to define a variable.
28th Jun 2016, 4:44 PM
Anshul Bansal
+ 1
A variable is a location in memory where you can store data temporarily and his content may vary through run time. This one is identified by an unique name.
28th Jun 2016, 3:30 PM
Kerbin Santiago Díaz Rivas
Kerbin Santiago Díaz Rivas - avatar
0
a variable is something which assigns any value to it
28th Jun 2016, 8:02 AM
Tanvir
Tanvir - avatar
0
why are you answering yourself?
28th Jun 2016, 8:13 AM
Loeschzwerg
0
A variable defines a number or an statement
1st Jul 2016, 12:38 PM
waliid
waliid - avatar
0
A variable as it sounds contains a specific value like a string.or a number..for example X=1 Y=2 print(X+Y) //output= 3 this means that X contains a value of one and Y contains a value of 2.both added together gives 3
9th Jul 2016, 8:21 AM
Darsh
Darsh - avatar
- 1
I believe it's to get a self-learner achievement after five upvotes.
28th Jun 2016, 2:55 PM
David Rickman
David Rickman - avatar