π Hello World
Published Aug 3, 2021Updated Sep 9, 2021
Contribute to Docs
We write Emojicode programs in files with the extension .emojic or .π.
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 go here
π
To print in Emojicode, we use the π
βοΈ
method:
π π€Hello, World!π€βοΈ
This prints βHello, World!β to the terminal.
π€Hello, World!π€
is a string. 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.
Example
Hereβs a program called welcome.emojic that prints a string:
π ππ π€Welcome to Codecademy Docsπ€βοΈπ
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Emojicode on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Free course
Learn Emojicode
π Learn about Emojicode, a programming language that consists of emojis! πBeginner Friendly1 hour