Learn

LOLCODE programs are stored in files that have the file extension .lol. Each file is set up with at least two lines:

HAI 1.2 KTHXBYE
  • The first line contains HAI and a version number.
  • The last line contains the word KTHXBYE.

For example, in the above code snippet, we’re using version 1.2 of LOLCODE.

These two lines are required as the start and end of every LOLCODE program. Any code we write will go in between these two lines.

Note: All LOLCODE keywords are written in uppercase.


HAI is treated as cat slang for “hi.”
KTHXBYE is short for “ok thanks bye.”

Instructions

1.

In the index.lol file, type in the two required lines of LOLCODE.

2.

In the bash terminal, type the following command after the $ sign and press enter:

lci index.lol

The lci is the LOLCODE intepreter and the index.lol is the file name.

This program doesn’t do anything yet. In the next exercise, we’ll put some more content into the file and have it output things.

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?