What is a variable?
Hello,
I am working on some of my Computer Science homework, and we're on the Variables unit. But, I am having a hard time understanding what a "variable" actually is. Can someone help me with this?
amountChickens
variable = variable
Ah, you actually got me there...
I thought you were going crazy for a second
@DynamicSquid lmao gotem
@SixBeeps At first I looked at your question and was like "come on, what kinda question is this?", then I looked at your username and was like "hold up..."
He’s not crazy. Sometimes people know what it is, but can’t explain. For instance, take the definition of “know”. You would say, “I know what it means, but I can’t say it in words.” It’s kind of like that. @DynamicSquid
@CodeABC123 True, but I was referring more to the person asking the question. Like @SixBeeps asking this question?
I know, I also thought he was going crazy for a second too, but I thought carefully. And some of the best coders are not the best explainers, like me. I’m good at coding, but I have a hard time explaining why I didn’t do my homework. @DynamicSquid
A variable can be a lot of thing like a bool describes true or false variables are data values that can changes when the user is asked a queston - GOOGLE DEFINITION <<<<<<<<<<<<<------------!!!!!!!!!!!!!!!!!!!!!!!!!
@DeaconBurgess this was april fools joke
@Thecrowbar1234 4th time in a row :(
@Thecrowbar1234 r/woooosh
What grade u in....
I’m currently going to year 11 (Gonna have IGCSE ‘s at the end of the year)
@dillonjoshua68 I'm going to be a freshman in college
Ohhh ok, so u must’ve finished ur A-levels recently? @SixBeeps
@dillonjoshua68 I'm in the US, so we don't have them :)
Oh ok :) .. I’m in UAE, in a British curriculum school... so yah... I will be having them in the future @SixBeeps
@dillonjoshua68 Ah I see. Good luck with them ^^
A variable can be thought of as a "storage container". For some languages, this storage container has a specific to what is allowed and what isn't, such as C#. To other languages, this is undetermined, such as JavaScript.
Also, nice joke!
It's like a file containing information, but very small and 8nky on 1 line, for more than 1 line it's a list
@MesyetiIsTaken This is very information
@SixBeeps what?
@MesyetiIsTaken
Look at when my original post was created
@SixBeeps Good April Fools joke. Not falling for it.
I'm assuming it's python.
A variable is to store data like:
hi = "Hi," name = input("What is your name?\n") print(hi, name + "!")
You can use it for input
, numbers
, strings
(text), and all sorts of things!
@GaneshaSharma Look at the date/time this was posted
A variable is a location in memory where your data is stored. The variable is a pointer to the address where the var is stored. Ex: 0x7c00, 0xFFFFF
Think of a variable as a container, and the computer labels it. When you are ready to retrieve or modify it, the computer finds the "container" and does whatever you tell it to do.
@Baconman321 Look at when this was posted
@SixBeeps I know
@Baconman321 Then why did you respond with a legitimate answer?
@SixBeeps Because yes (also for anyone viewing this question that doesn't know what a variable is).
@Baconman321 can I use your answer for a tutorial I’m making that will never come to fruition?
@Highwayman sure, it's taken from alot of other tutorials though.
@Baconman321 🤷♂️ Thanks anyways :P
A variable is a name that stores a specific value.
@JannaYoussef Look at when this was posted
ha you tryed
In programming, a variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instruction s that tell the computer what to do and data that the program uses when it is running.
Look at when this was posted and who it was posted by. @LiamDonohue
if you mark this comment as the answer, you shall be forever blessed.
@MrEconomical Sounds pretty sus ngl
@MrEconomical It has been exactly 11 months, so here ya go.