Variable Flyer
String, Float and Interger
What is a variable?
A variable is something with a value that may change. In simpler terms, a variable is just a box that you can put stuff in, like the one below. You can use variables to store all kinds of stuff. |if that wasn't enough, there is also a video explaining below!
Examples
lucky = 7 print (lucky) 7
In this program, I created a variable called lucky, and assigned to it the value of the integer number 7. Then, I just asked Python to tell us what was stored in the variable lucky, and it did.
What is a variable?
Interger
An interger is a whole number, it is a data type.
Here is an example
my_variable_int = 7
Below is what an interger is!
Integers - What is an Integer? - YourTeacher.com
Float
A float is a number that is decimalized.
An example...
my_variable_float = 1.23
String
A string is something that isn't a interger or a float. It is in quotes.
Here's an example
"Hello, I'm a string!