We write Emojicode programs in files with the extension .emojic or .π. Here in the code editor, we have a file named hello.emojic. It will also work if itβs named hello.π.
Almost all the code in an Emojicode program will live inside a π
block. A block is a collection of code. The π
block indicates all the code that should run when the file is executed.
Within our larger program, we can indicate one or more blocks of code with π
π
code blocks:
π
to indicate the start of the code blockπ
to indicate the end of the code block
So a basic Emojicode file will have the following structure:
π π
Some code goes here
More code goes here
π
Letβs see some Emojicode in action!
Instructions
The provided program has a single line of code π π€Hello, world!π€βοΈ
.
This lives within a π
π
code block. We will explain exactly how that line works soon, but for now, press Run to see the program in action.
What message appeared in the terminal?