"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.
To understand the different types of data in Emojicode, take a look at the table on the right.
Press Next to continue.