The "Hello, world!"
program simply writes to the screen. It does not read anything, calculate anything, or allow for user input. Thatโs no fun!
Real programs tend to produce results based on some input that the user of the program gives, rather than just outputting the same thing every time.
For our computer to produce something meaningful, we first need somewhere in the computerโs memory to store data. That is where variables come in.
A variable is simply a name that represents a particular piece of your computerโs memory that has been set aside for you to store, retrieve, and use data.
Every variable has a type, which represents the kind of information you can store inside of it. It tells your compiler how much memory to set aside for the variable, and it defines what you can do with the variable.
We wonโt dive into types in Emojicode, but just know that there are a few basic data types:
๐ข
: integer numbers๐ฏ
: decimal numbers๐ก
: text strings๐
: truth values (๐
/๐
)
In this lesson, we will learn about constants and mutable variables, as well as ways to play with them.
Instructions
To understand the different types of data in Emojicode, take a look at the table on the right.
Press Next to continue.