Learn
Hello World
Print
As the old saying goes: βIf a program runs on your computerβ¦ but it doesnβt generate any outputβ¦ did it really run?β π€ Well, probably! But displaying output is still super important.
In this course, we will often want to see the results of our labor with messages and data printed to the console, or terminal.
To print in Emojicode, we use the π
βοΈ
method. Letβs look at an example:
π π€Hello, World!π€βοΈ
The code above prints Hello, World!
to the terminal.
π€Hello, World!π€
is a string (weβll learn more about strings in the next exercise). It holds the message we want to print to the terminal.- We wrap the thing we want to print with a
π
at the start and aβοΈ
at the end.
Letβs practice some printing.
Instructions
1.
Youβre going to be using a lot of Emojis in this courseβ¦ You can quickly pull up the emoji keyboard by pressing:
- Mac: control + command + space
- Windows: β + .
Put those shortcuts to work!
Within the provided π
π
code block, print your name as a text string (wrap your name in π€
βs).