ACHOO Docs

How to write ACHOO, one sneeze at a time. Bless you.

Contents
How to write ACHOO - Help

1. Welcome

ACHOO is a programming language where you write programs out of sneezes. Every piece of code, every letter and every symbol is written as a sneeze, or as one of the things people say back to someone who sneezes.

Behind the scenes ACHOO turns your sneezes into Python and runs that. So when you write ACHOO, you are really writing Python in disguise. Anything Python can do, ACHOO can do. If you already know a little Python, you already know what ACHOO programs can say. You only have to learn how to sneeze it.

Wait, is this a joke?

Yes. ACHOO is an esoteric programming language, or esolang for short. Esolangs are languages made for fun, not for getting work done. Some are made to be as hard as possible, some to look silly, and some just to see if an idea can work at all. Nobody builds a real app in one. People write them to make other programmers laugh, groan, or wonder why anyone would do this.

A few famous ones:

  • Brainfuck has only 8 commands, each a single symbol like + or [. ACHOO started out as Brainfuck written in sneezes.
  • Ook! is Brainfuck rewritten as orangutan noises: Ook., Ook? and Ook!.
  • INTERCAL refuses to run your program if you don't say PLEASE often enough, and also if you say it too often. That's where the bless you rule comes from.
  • Chef programs look like cooking recipes, and LOLCODE programs look like internet cat memes.

So ACHOO is a joke, but a working one. Every program in these docs really runs, and it can do anything Python can. It's just a very silly way to do it. If you ever find yourself writing something important in ACHOO, take a tissue and have a little lie down.

These docs start from zero. You don't need to know Python or binary. Every part explains one idea, shows examples and then gives you a short quiz to check you got it. Take your time with the parts about counting o's and binary letters, because those are the bits people find hardest.

Every example on this page was made by the real ACHOO interpreter and checked before it went here, so you can copy them and they will run.

2. Getting ready

There are three ways to run ACHOO. Pick whichever you like.

The website

The ACHOO Interpreter page runs programs right in your browser. Paste or type your sneezes into the box and press Run. Point at any word and a little yellow box tells you what it means, which is very handy while you learn.

As you type, a list pops up under the cursor with the sneezes that fit, and what each one does in small text underneath. Use the arrow keys to move through it and Enter or Tab to pick one, or tap it on a phone. It works backwards too: type a Python word like print or a symbol like ( and it suggests the sneeze for it, and type any single letter to get its spelled sneeze.

The fastest way to spell text is the bracket shortcut: start a word with (, type your text, and finish with ). As soon as you type the closing bracket, everything inside turns into spelled sneezes, so (Hi there) becomes the binary letters for Hi there, with acho for the space. It doesn't work after sniff, because comments are normal words.

You can also type a whole line of normal Python, like print("example"), and press space twice. The line turns into ACHOO. If the line already starts with sneezes, those stay as they are and only the Python after them is translated. It skips comment lines and the bless you and sorry everyone lines, and it translates one line at a time, so it doesn't add blessings for you. For whole programs, Convert Python is still the easiest.

Installing it on Windows

Download the ACHOO zip, extract it and double-click install.bat. You need Python 3.10 or newer. After that:

  • double-click any .ach file to run it
  • right-click in a folder, then New, then ACHOO Program to make a new one
  • right-click a .ach file, then Edit to open it in Notepad
  • type achoo yourfile.ach in a new terminal window

achoo.py on any computer

On Mac, Linux, or Windows without the installer, run achoo.py with Python:

python3 achoo.py program.ach
python3 achoo.py --sneezify program.py > program.ach
python3 achoo.py --python program.ach
python3 achoo.py --sneezes

The first line runs a program. The second turns a Python file into sneezes. The third shows you the Python hidden inside a sneeze file, which is the best way to check your work. The last one lists every sneeze.

ACHOO files end in .ach. Older files ending in .achoo still work.

3. Your first program

Here is the classic first program. It prints Hello, World! on the screen.

ACHOO
gesundheit achooo achooooooooo achOooOooo achOOooOoO achOOoOOoo achOOoOOoo achOOoOOOO achoooooo acho achOoOoOOO atchoooooo achOOoOOoo achOOooOoo achOooooO achooooooooo achoooo
sorry everyone
The same thing in Python
print("Hello, World!")

It looks like nonsense, but every single word means something. Let's take it apart word by word, left to right:

WordKindHow to read itMeans
gesundheitreply wordreply wordprint
achoooworld sneezeachoo group, 3 o's(
achoooooooooworld sneezeachoo group, 9 o's"
achOooOooospelled letterbinary 1001000 = 72H
achOOooOoOspelled letterbinary 1100101 = 101e
achOOoOOoospelled letterbinary 1101100 = 108l
achOOoOOoospelled letterbinary 1101100 = 108l
achOOoOOOOspelled letterbinary 1101111 = 111o
achooooooworld sneezeachoo group, 6 o's,
achoworld sneezeachoo group, 1 o'sa space
achOoOoOOOspelled letterbinary 1010111 = 87W
atchooooooworld sneezeatchoo group, 6 o'sor
achOOoOOoospelled letterbinary 1101100 = 108l
achOOooOoospelled letterbinary 1100100 = 100d
achOooooOspelled letterbinary 100001 = 33!
achoooooooooworld sneezeachoo group, 9 o's"
achooooworld sneezeachoo group, 4 o's)

Put all the meanings together and you get print("Hello, World!"). That's the whole trick: each word is one small piece of the Python code, and they join up with nothing in between.

Notice the three colours. The orange word is a reply word, the green ones are world sneezes and the blue ones are spelled letters. Those are the three kinds of words in ACHOO, and the next three parts explain each of them.

The last line, sorry everyone, isn't code at all. It's manners. Every ACHOO program has to end by apologising for all that sneezing. You'll learn the manners in parts 8 and 9.

Quiz 1: Your first program
1. What does ACHOO turn your sneezes into before running them?
2. In Hello World, what does gesundheit mean?
3. What has to be the last line of every ACHOO program?

4. Reply words

The code people use most often gets a reply word: something you would say to someone who sneezes. There are 14 of them, and they are the easiest part of ACHOO because you can read them like normal words.

Reply wordMeansA way to remember it
gesundheitprintwhat you say to someone who sneezes, and print says something too
coughdefa cough comes before a sneeze, and def comes before a function
tissuereturnyou hand a tissue back
saludifSpanish for bless you, used for the most common question in code
santeelseFrench, its partner
saluteelifItalian, sits between the two
zdrowieforPolish for bless you, used for repeating things
prositwhileGerman toast, also for repeating things
hankyselfthe hanky that belongs to the object itself
sniffleimportyou sniffle when you catch something from elsewhere
feverclassa fever is a whole category of sick
healthyTruehealthy is true
sickFalsesick is false
snotNonesnot is nothing useful

Reply words are always written in small letters, exactly as shown. Gesundheit with a capital G is not a reply word and will crash your program.

Here is a tiny program that only needs reply words and a few sneezes. It prints True, because healthy means True:

ACHOO
gesundheit achooo healthy achoooo
sorry everyone
The same thing in Python
print(True)
Quiz 2: Reply words
1. Which reply word means print?
2. What does tissue mean?
3. salud, sante and salute mean...
4. Which one is NOT a reply word?

5. World sneezes

Everything else that's common in code, like brackets, the equals sign, colons and words like and or range, is a world sneeze. ACHOO uses 8 ways people around the world write a sneeze:

achoo, atchoo, ahchoo, hachoo, hatchoo, aitchoo, atishoo, kerchoo

Each spelling is a group, and each group holds up to 9 pieces of code. To read a world sneeze you need two things:

  1. Which group is it? Look at the letters before the o's. ach is the achoo group, hatch is the hatchoo group, and so on.
  2. How many o's are there? Count them. That number picks the piece of code inside the group.

For example, achooo is the achoo group with 3 o's, which is (. And hatchoooooooo is the hatchoo group with 8 o's, which is ==.

Tips for counting o's

  • Count in threes. ooo ooo oo is 3 + 3 + 2 = 8, much easier than counting one by one.
  • On the website, point at the sneeze and the tooltip counts for you.
  • There are never more than 9 o's in a world sneeze. If you count 10 or more, something's wrong, and the interpreter will say so: nobody sneezes that hard.
  • The two most common sneezes are short on purpose: acho (1 o) is a space and achoo (2 o's) is 4 spaces, which is how you indent code.

Every world sneeze

Here they all are, group by group. You don't need to learn them by heart. Keep this page open while you write, or use the sneeze table on the website.

The achoo group

o'sSneezeMeans
1achoa space
2achoo4 spaces
3achooo(
4achoooo)
5achooooo.
6achoooooo,
7achooooooo:
8achoooooooo=
9achooooooooo"

The atchoo group

o'sSneezeMeans
1atcho'
2atchooin
3atchooofrom
4atchoooo__init__
5atchoooooand
6atchooooooor
7atchooooooonot
8atchoooooooois
9atchoooooooootry

The ahchoo group

o'sSneezeMeans
1ahchoexcept
2ahchoofinally
3ahchooowith
4ahchooooas
5ahchooooolambda
6ahchooooooyield
7ahchooooooopass
8ahchoooooooobreak
9ahchooooooooocontinue

The hachoo group

o'sSneezeMeans
1hachoraise
2hachooglobal
3hachooononlocal
4hachoooodel
5hachoooooassert
6hachooooooasync
7hachoooooooawait
8hachoooooooo[
9hachooooooooo]

The hatchoo group

o'sSneezeMeans
1hatcho{
2hatchoo}
3hatchooo+
4hatchoooo-
5hatchooooo*
6hatchoooooo/
7hatchooooooo%
8hatchoooooooo==
9hatchooooooooo!=

The aitchoo group

o'sSneezeMeans
1aitcho<
2aitchoo>
3aitchooo<=
4aitchoooo>=
5aitchooooo+=
6aitchoooooo-=
7aitchooooooo->
8aitchoooooooo**
9aitchooooooooo//

The atishoo group

o'sSneezeMeans
1atisho#
2atishoo@
3atishooo_
4atishoooo__name__
5atishooooo__main__
6atishoooooorange
7atishooooooolen
8atishooooooooinput
9atishooooooooostr

The kerchoo group

o'sSneezeMeans
1kerchoint
2kerchoo\
3kerchooomatch
4kerchoooocase
5kerchooooof
Quiz 3: World sneezes
1. What does achooo mean? (achoo group, 3 o's)
2. How many o's does achoooooooo have?
3. What's the most o's a world sneeze can ever have?
4. What is acho?

6. Spelled letters

Names you make up, numbers and the text inside quotes are spelled out one character at a time. These words always start with ach and then use a mix of small o's and capital O's. The capital O's are what tell ACHOO it's a letter and not a world sneeze.

The o's and O's are a number written in binary: small o means 0 and capital O means 1. That number is the character's code, the number every computer uses for that letter.

Binary in two minutes

Normal numbers use ten digits, 0 to 9. Binary only uses two: 0 and 1. Each position in a binary number is worth double the one to its right. For a 7-digit binary number, the positions are worth:

Position1st2nd3rd4th5th6th7th
Worth6432168421

To read a binary number, add up the positions that have a 1. For example 1001000: the 1st position (64) and the 4th position (8) are 1, so it's 64 + 8 = 72. Character 72 is the capital letter H.

Reading a spelled letter

Take achOooOooo:

  1. Drop the ach at the start: OooOooo
  2. Swap o for 0 and O for 1: 1001000
  3. Add up the positions: 64 + 8 = 72
  4. Look up character 72 in the tables below: H

Writing a spelled letter

Going the other way, to spell the letter e:

  1. Find its character code in the tables below: 101
  2. Make it out of 64, 32, 16, 8, 4, 2 and 1: 101 = 64 + 32 + 4 + 1
  3. Write a 1 for each position you used and 0 for the rest: 1100101
  4. Swap 1 for O and 0 for o, and put ach in front: achOOooOoO

Two handy facts: a lowercase letter's code is always 32 more than its capital (H is 72, h is 104), and spelled letters always start with a capital O, because the first position is always a 1. If one starts with a small o, the interpreter complains that it starts weakly.

Numbers are spelled too

The number 42 is the character 4 followed by the character 2, so it's two spelled letters: achOOoOoo achOOooOo. Don't spell the number 42 itself in binary. Spell its digits.

Letter tables

Lowercase letters

LetterCodeBinarySneeze
a971100001achOOooooO
b981100010achOOoooOo
c991100011achOOoooOO
d1001100100achOOooOoo
e1011100101achOOooOoO
f1021100110achOOooOOo
g1031100111achOOooOOO
h1041101000achOOoOooo
i1051101001achOOoOooO
j1061101010achOOoOoOo
k1071101011achOOoOoOO
l1081101100achOOoOOoo
m1091101101achOOoOOoO
n1101101110achOOoOOOo
o1111101111achOOoOOOO
p1121110000achOOOoooo
q1131110001achOOOoooO
r1141110010achOOOooOo
s1151110011achOOOooOO
t1161110100achOOOoOoo
u1171110101achOOOoOoO
v1181110110achOOOoOOo
w1191110111achOOOoOOO
x1201111000achOOOOooo
y1211111001achOOOOooO
z1221111010achOOOOoOo

Capital letters

LetterCodeBinarySneeze
A651000001achOoooooO
B661000010achOooooOo
C671000011achOooooOO
D681000100achOoooOoo
E691000101achOoooOoO
F701000110achOoooOOo
G711000111achOoooOOO
H721001000achOooOooo
I731001001achOooOooO
J741001010achOooOoOo
K751001011achOooOoOO
L761001100achOooOOoo
M771001101achOooOOoO
N781001110achOooOOOo
O791001111achOooOOOO
P801010000achOoOoooo
Q811010001achOoOoooO
R821010010achOoOooOo
S831010011achOoOooOO
T841010100achOoOoOoo
U851010101achOoOoOoO
V861010110achOoOoOOo
W871010111achOoOoOOO
X881011000achOoOOooo
Y891011001achOoOOooO
Z901011010achOoOOoOo

Digits

DigitCodeBinarySneeze
048110000achOOoooo
149110001achOOoooO
250110010achOOooOo
351110011achOOooOO
452110100achOOoOoo
553110101achOOoOoO
654110110achOOoOOo
755110111achOOoOOO
856111000achOOOooo
957111001achOOOooO

Other symbols you might need

SymbolCodeBinarySneeze
!33100001achOooooO
?63111111achOOOOOO
$36100100achOooOoo
&38100110achOooOOo
;59111011achOOOoOO
^941011110achOoOOOOo
|1241111100achOOOOOoo
~1261111110achOOOOOOo
`961100000achOOooooo

Symbols like ( or = also have spelled versions, but you'll normally use their world sneezes instead because they are shorter.

Quiz 4: Spelled letters
1. In a spelled letter, what does a capital O stand for?
2. What is the binary 1000001 as a normal number?
3. Which letter is achOOoOooo?
4. How do you write the number 7 in ACHOO?

7. How lines work

An ACHOO file is made of lines, and each line of sneezes becomes exactly one line of Python. Line 5 of your sneezes is line 5 of the Python, which also means error messages point at the right line.

Spaces between words don't count

The spaces you type between sneezes are only there to separate the words. They don't end up in the code. When you want a real space in your code, like between print and something else, or inside text, you sneeze it: acho.

Indentation is a sneeze too

Python uses indentation to show which lines belong inside an if, a loop or a function. In ACHOO you write that indentation with sneezes at the start of the line: achoo is 4 spaces, and two of them is 8 spaces. You can put normal spaces at the start of an ACHOO line to make it look nice, but they are ignored. Only the sneezes count.

ACHOO
zdrowie acho achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo acho atchoo acho atishoooooo achooo achOOooOO achoooo achooooooo
achoo gesundheit achooo achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo achoooo
sorry everyone
The same thing in Python
for number in range(3):
    print(number)

The second line starts with achoo, which puts print(number) inside the loop.

You can always spell things out

Every reply word and world sneeze is a shortcut. You could spell print letter by letter instead of writing gesundheit, and it would work exactly the same. The converter always picks the shortest way, so it uses the shortcut.

Empty lines

Empty lines are fine anywhere and do nothing, just like in Python.

Quiz 5: Lines
1. Do the spaces you type between sneezes end up in the code?
2. What does achoo at the start of a line do?
3. Line 12 of your sneezes is which line of the Python?

8. bless you and the 7 statements rule

This is the rule people get stuck on most, so this part goes slowly.

ACHOO is a polite interpreter. After it has read 7 statements, it wants a line that says bless you before it reads any more. If it doesn't get one, the program crashes. If you say it too early, it also crashes.

What exactly is a statement?

A statement is one line of code that actually does something. In practice, count the lines of your program, but skip a few kinds of lines. Here are the exact rules, all tested on the real interpreter:

LineCounts?
A normal line of code, like x = 5 or print("hi")Yes, 1
An if, elif, else, for, while, def or class line (the one ending with a colon)Yes, 1
Each line inside an if, loop or functionYes, 1 each
A decorator line like @propertyYes, 1
An empty lineNo
A comment line (sniff in ACHOO, # in Python)No
A statement split over several lines, like a long list with one item per lineYes, but only once, on the line where it starts
Two statements on one line with a semicolon, like a = 1; b = 2Yes, but only once
A short if on one line, like if ready: go()Yes, but only once
The bless you line itselfNo, it resets the count to 0
The sorry everyone lineNo

Counting example 1

Here is a short Python program with its count next to each line. A dash means the line doesn't count.

CountPython line
1age = 12
2if age > 10:
3 print("big")
4 print("really big")
5else:
6 print("small")
- 
-# done checking
7print("bye")

That's 7 statements, so this program needs no blessing at all. If you added one more line of code at the end, it would be statement 8, and you would need a bless you line just before it.

Counting example 2

CountPython line
1names = [
"Ada",
"Bo",
]
2total = 0
3total += 1; total += 2
4print(names, total)

The list starts on line 1 and carries on until the ], but it's all one statement, so it only counts once. Line 6 has two statements joined by a semicolon, and that also only counts once.

Where the blessing goes

The blessing goes after statement 7 and before statement 8. Then the count starts again from 0, so the next blessing goes after statement 14 and before 15, and so on. Here are 8 statements with the blessing in the right place:

ACHOO
achOOOOooo achOOoooO acho achoooooooo acho achOOoooO
achOOOOooo achOOooOo acho achoooooooo acho achOOooOo
achOOOOooo achOOooOO acho achoooooooo acho achOOooOO
achOOOOooo achOOoOoo acho achoooooooo acho achOOoOoo
achOOOOooo achOOoOoO acho achoooooooo acho achOOoOoO
achOOOOooo achOOoOOo acho achoooooooo acho achOOoOOo
achOOOOooo achOOoOOO acho achoooooooo acho achOOoOOO
bless you
achOOOOooo achOOOooo acho achoooooooo acho achOOOooo
sorry everyone

Some details:

  • The blessing line must say only bless you, on its own line. Capital letters don't matter, so Bless You also works.
  • Indentation doesn't matter for the blessing. It can be at the start of the line even inside a loop, because it isn't code.
  • If your program has exactly 7 statements and you put a blessing after them, that's fine too.
  • A blessing after only 3, 5 or 6 statements is too early, and the program crashes.
  • Blank lines and comments between your statements don't change the count.

What the errors look like

If you forget the blessing:

SneezeError: program.ach, line 8: nobody blessed me (put a "bless you" line before this one)

If you bless too early:

SneezeError: program.ach, line 4: blessed too early, only 3 statement(s) since the last "bless you"

Both messages tell you the line number, so you know exactly where to look.

The easy way

Counting by hand gets tiring in long programs. If you write your program in Python and convert it, either with Convert Python on the website or python3 achoo.py --sneezify, the converter counts for you and puts every bless you in exactly the right place.

Quiz 6: bless you and the 7 statements rule
1. A program has 8 lines of code and no blank lines or comments. Where does bless you go?
2. Do empty lines and comment lines count as statements?
3. How many statements is this? names = [ / "Ada", / ]
4. Does the line else: count?
5. You put bless you after statement 5. What happens?
6. How many statements is a = 1; b = 2?

9. sorry everyone

The last line of every ACHOO program has to be sorry everyone. It apologises for all the sneezing, and the program won't run without it:

SneezeError: program.ach: you sneezed on everyone and never apologised (the last line must be "sorry everyone")
  • It has to be the last line that isn't empty. Empty lines after it are fine.
  • Capital letters don't matter: Sorry Everyone works too.
  • It's manners, not code, so it isn't a statement and doesn't count towards the 7.

10. Comments with sniff

A comment is a note for people reading the code. The computer ignores it. In ACHOO, a comment starts with the word sniff. Everything after it on that line can be normal words, and ACHOO skips it.

ACHOO
sniff count to three
zdrowie acho achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo acho atchoo acho atishoooooo achooo achOOooOO achoooo achooooooo sniff 0, 1 and 2
achoo gesundheit achooo achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo achoooo
sorry everyone
The same thing in Python
# count to three
for number in range(3):  # 0, 1 and 2
    print(number)
  • A comment can take a whole line, or go at the end of a line after the code.
  • Comments aren't statements, so they don't count towards the 7.
  • When you convert Python, its # comments become sniff comments. A # inside text, like "#1 fan", stays text.
Quiz 7: sorry everyone and comments
1. What starts a comment in ACHOO?
2. Can you write normal words in a comment?
3. What happens if you forget sorry everyone?

11. Writing real programs

Now you know all the pieces. This part shows the things you'll write most often. Each one shows ACHOO first and then the same thing in Python, so you can match them up. Point at the words on the website to decode them as you go.

Variables

A variable is a name that holds a value. The name is spelled with letters, then acho achoooooooo acho for = , then the value.

ACHOO
achOOOooOO achOOoooOO atchoooooo achOOooOoO acho achoooooooo acho achOOoooO achOOoooo
gesundheit achooo achOOOooOO achOOoooOO atchoooooo achOOooOoO achoooo
sorry everyone
The same thing in Python
score = 10
print(score)

Text

Text goes inside quotes. achooooooooo is a double quote and atcho is a single quote. Everything between the quotes is spelled letter by letter, including spaces.

ACHOO
achOOoOOOo achOOooooO achOOoOOoO achOOooOoO acho achoooooooo acho achooooooooo achOoooooO achOOooOoo achOOooooO achooooooooo
gesundheit achooo achooooooooo achOooOooo achOOoOooO acho achooooooooo acho hatchooo acho achOOoOOOo achOOooooO achOOoOOoO achOOooOoO achoooo
sorry everyone
The same thing in Python
name = "Ada"
print("Hi " + name)

Maths

The maths symbols all have world sneezes: hatchooo is +, hatchoooo is -, hatchooooo is *, hatchoooooo is /, hatchooooooo is % (the remainder), aitchoooooooo is ** (power) and aitchooooooooo is // (divide and round down).

ACHOO
achOOOoOoo achOOoOOOO achOOOoOoo achOOooooO achOOoOOoo acho achoooooooo acho achOOoOOo acho hatchooooo acho achOOoOOO
gesundheit achooo achOOOoOoo achOOoOOOO achOOOoOoo achOOooooO achOOoOOoo achoooo
sorry everyone
The same thing in Python
total = 6 * 7
print(total)

Asking the user

atishoooooooo is input. It waits for the user to type something. Whatever they type comes back as text.

ACHOO
achOOoOOOo achOOooooO achOOoOOoO achOOooOoO acho achoooooooo acho atishoooooooo achooo achooooooooo achOoOOooO achOOoOOOO achOOOoOoO achOOOooOo acho achOOoOOOo achOOooooO achOOoOOoO achOOooOoO achOOOOOO acho achooooooooo achoooo
gesundheit achooo achooooooooo achOooooOo achOOoOOoo achOOooOoO achOOOooOO achOOOooOO acho achOOOOooO achOOoOOOO achOOOoOoO achoooooo acho achooooooooo acho hatchooo acho achOOoOOOo achOOooooO achOOoOOoO achOOooOoO achoooo
sorry everyone
The same thing in Python
name = input("Your name? ")
print("Bless you, " + name)

Making choices with if

salud is if, salute is elif and sante is else. Don't forget the colon achooooooo at the end of each of those lines, and the indent achoo on the lines inside.

ACHOO
achOOOoOoo achOOooOoO achOOoOOoO achOOOoooo achOOooOoO achOOOooOo achOOooooO achOOOoOoo achOOOoOoO achOOOooOo achOOooOoO acho achoooooooo acho achOOooOO achOOOooO
salud acho achOOOoOoo achOOooOoO achOOoOOoO achOOOoooo achOOooOoO achOOOooOo achOOooooO achOOOoOoo achOOOoOoO achOOOooOo achOOooOoO acho aitchoo acho achOOooOO achOOOooo achooooooo
achoo gesundheit achooo achooooooooo kerchooooo achOOooOoO achOOOoOOo achOOooOoO achOOOooOo achooooooooo achoooo
salute acho achOOOoOoo achOOooOoO achOOoOOoO achOOOoooo achOOooOoO achOOOooOo achOOooooO achOOOoOoo achOOOoOoO achOOOooOo achOOooOoO acho aitchoo acho achOOooOO achOOoOOO achooooooo
achoo gesundheit achooo achooooooooo achOOOoOOO achOOooooO achOOOooOo achOOoOOoO achooooooooo achoooo
sante achooooooo
achoo gesundheit achooo achooooooooo achOOoOooo achOOooOoO achOOooooO achOOoOOoo achOOOoOoo achOOoOooo achOOOOooO achooooooooo achoooo
sorry everyone
The same thing in Python
temperature = 39
if temperature > 38:
    print("fever")
elif temperature > 37:
    print("warm")
else:
    print("healthy")

Comparisons: hatchoooooooo is equal, hatchooooooooo is not equal, aitcho and aitchoo are less and more, aitchooo and aitchoooo are less-or-equal and more-or-equal. atchooooo, atchoooooo and atchooooooo combine them.

Repeating with for and while

zdrowie repeats something for every item. atchoo is in, and atishoooooo is range, which gives you numbers.

ACHOO
zdrowie acho achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO acho atchoo acho atishoooooo achooo achOOoooO achoooooo acho achOOoOoo achoooo achooooooo
achoo gesundheit achooo achooooooooo achOOooooO achOOoooOO achOOoOooo achOOoOOOO achOOoOOOO acho achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo achooooooooo achoooooo acho achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achoooo
sorry everyone
The same thing in Python
for sneeze in range(1, 4):
    print("achoo number", sneeze)

prosit repeats as long as something is true:

ACHOO
achOOOoOoo atchoooooooo achOOOooOO achOOOoOoO achOOooOoO achOOOooOO acho achoooooooo acho achOOooOO
prosit acho achOOOoOoo atchoooooooo achOOOooOO achOOOoOoO achOOooOoO achOOOooOO acho aitchoo acho achOOoooo achooooooo
achoo gesundheit achooo achOOOoOoo atchoooooooo achOOOooOO achOOOoOoO achOOooOoO achOOOooOO achoooooo acho achooooooooo achOOOoOoo atchoooooooo achOOOooOO achOOOoOoO achOOooOoO achOOOooOO acho achOOoOOoo achOOooOoO kerchooooo achOOOoOoo achooooooooo achoooo
achoo achOOOoOoo atchoooooooo achOOOooOO achOOOoOoO achOOooOoO achOOOooOO acho aitchoooooo acho achOOoooO
sorry everyone
The same thing in Python
tissues = 3
while tissues > 0:
    print(tissues, "tissues left")
    tissues -= 1

Functions

cough makes a function and tissue hands back its answer.

ACHOO
cough acho achOOooOoo achOOoOOOO achOOOoOoO achOOoooOo achOOoOOoo achOOooOoO achooo achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo achoooo achooooooo
achoo tissue acho achOOoOOOo achOOOoOoO achOOoOOoO achOOoooOo achOOooOoO achOOOooOo acho hatchooooo acho achOOooOo


gesundheit achooo achOOooOoo achOOoOOOO achOOOoOoO achOOoooOo achOOoOOoo achOOooOoO achooo achOOooOo achOOoooO achoooo achoooo
sorry everyone
The same thing in Python
def double(number):
    return number * 2


print(double(21))

Lists

hachoooooooo and hachooooooooo are square brackets. achoooooo is a comma.

ACHOO
achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO acho achoooooooo acho hachoooooooo achooooooooo achOOooooO achOOoooOO achOOoOooo achOOoOOOO achOOoOOOO achooooooooo achoooooo acho achooooooooo achOOooooO achOOOoOoo atchoooooooo achOOoOooo achOOoOOOO achOOoOOOO achooooooooo achoooooo acho achooooooooo achOOoOoOO achOOooOoO achOOOooOo achOOoooOO achOOoOooo achOOoOOOO achOOoOOOO achooooooooo hachooooooooo
zdrowie acho achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO acho atchoo acho achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO achooooooo
achoo gesundheit achooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achoooo
gesundheit achooo atishooooooo achooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO achoooo achoooo
sorry everyone
The same thing in Python
sneezes = ["achoo", "atishoo", "kerchoo"]
for sneeze in sneezes:
    print(sneeze)
print(len(sneezes))

Classes

fever makes a class, hanky is self and atchoooo is __init__.

ACHOO
fever acho achOoOoooo achOOooooO achOOOoOoo achOOoOooO achOOooOoO achOOoOOOo achOOOoOoo achooooooo
achoo cough acho atchoooo achooo hanky achoooooo acho achOOoOOOo achOOooooO achOOoOOoO achOOooOoO achoooo achooooooo
achoo achoo hanky achooooo achOOoOOOo achOOooooO achOOoOOoO achOOooOoO acho achoooooooo acho achOOoOOOo achOOooooO achOOoOOoO achOOooOoO
achoo achoo hanky achooooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO acho achoooooooo acho achOOoooo

achoo cough acho achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achooo hanky achoooo achooooooo
achoo achoo hanky achooooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO acho aitchooooo acho achOOoooO
achoo achoo gesundheit achooo hanky achooooo achOOoOOOo achOOooooO achOOoOOoO achOOooOoO achoooooo acho achooooooooo achOOOooOO achOOooooO achOOOOooO achOOOooOO acho achOOooooO achOOoooOO achOOoOooo achOOoOOOO achOOoOOOO achooooooooo achoooo


bless you
achOOOoooo achOOooooO achOOOoOoo achOOoOooO achOOooOoO achOOoOOOo achOOOoOoo acho achoooooooo acho achOoOoooo achOOooooO achOOOoOoo achOOoOooO achOOooOoO achOOoOOOo achOOOoOoo achooo achooooooooo achOoooooO achOOooOoo achOOooooO achooooooooo achoooo
achOOOoooo achOOooooO achOOOoOoo achOOoOooO achOOooOoO achOOoOOOo achOOOoOoo achooooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achooo achoooo
achOOOoooo achOOooooO achOOOoOoo achOOoOooO achOOooOoO achOOoOOOo achOOOoOoo achooooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achooo achoooo
gesundheit achooo achOOOoooo achOOooooO achOOOoOoo achOOoOooO achOOooOoO achOOoOOOo achOOOoOoo achooooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO achoooooo acho achooooooooo achOOOooOO achOOoOOOo achOOooOoO achOOooOoO achOOOOoOo achOOooOoO achOOOooOO achooooooooo achoooo
sorry everyone
The same thing in Python
class Patient:
    def __init__(self, name):
        self.name = name
        self.sneezes = 0

    def sneeze(self):
        self.sneezes += 1
        print(self.name, "says achoo")


patient = Patient("Ada")
patient.sneeze()
patient.sneeze()
print(patient.sneezes, "sneezes")

That program has 11 statements, so it needs one bless you, between statement 7 (print(self.name, "says achoo")) and statement 8 (patient = Patient("Ada")). Find it in the sneezes above and count for yourself. Remember that the empty lines don't count.

Using Python's modules

sniffle is import and atchooo is from. Everything in Python's standard library works.

ACHOO
sniffle acho achOOOooOo atchooooo achOOoOOOO achOOoOOoO

gesundheit achooo achOOOooOo atchooooo achOOoOOOO achOOoOOoO achooooo achOOoooOO achOOoOooo achOOoOOOO achOOoOooO achOOoooOO achOOooOoO achooo hachoooooooo achooooooooo achOOooooO achOOoooOO achOOoOooo achOOoOOOO achOOoOOOO achooooooooo achoooooo acho achooooooooo achOOooooO achOOOoOoo atchoooooooo achOOoOooo achOOoOOOO achOOoOOOO achooooooooo hachooooooooo achoooo achoooo
sorry everyone
The same thing in Python
import random

print(random.choice(["achoo", "atishoo"]))
Quiz 8: Writing real programs
1. What does achooooooo mean, the sneeze at the end of if and for lines?
2. What does hatchoooooooo mean?
3. How is text between quotes written?
4. What does cough start?

12. The easy way to write ACHOO

Real ACHOO programmers almost never sneeze by hand. Here's how most ACHOO gets written:

  1. Write the program in Python.
  2. Convert it, with Convert Python on the website or python3 achoo.py --sneezify program.py &gt; program.ach.
  3. The converter adds every bless you and the sorry everyone for you, and keeps your comments as sniff comments.
  4. Run it.

To read sneezes, use the Debug button on the website or python3 achoo.py --python program.ach. Both show the Python hiding inside. Pointing at words on the website shows what each one means.

Hand-writing is still fun for small things, and it's the best way to really learn the sneezes. Start by changing the text in Hello World, then try adding a second line.

13. Error messages

When ACHOO is unhappy, it tells you with a SneezeError and the line number. Here's every one and how to fix it:

MessageWhat it meansHow to fix it
program.ach, line 1: 'hello' is not a sneezeA word that isn't a sneeze, a reply word or one of the mannersCheck the spelling. Reply words are lowercase. Normal words are only allowed after sniff.
program.ach, line 1: 12 o's? nobody sneezes that hardA world sneeze with more than 9 o'sCount the o's again. World sneezes go up to 9.
program.ach, line 1: 'kerchoooooo' doesn't mean anything yetA real sneeze spelling, but nothing is stored at that count yetCheck the count against the tables in part 5.
program.ach, line 1: 'achoO' starts weakly. spelled sneezes start with a capital OA spelled letter that starts with a small oSpelled letters always start with ach then a capital O.
nobody blessed me8 statements in a row without bless youPut bless you before the line it names.
blessed too earlybless you after fewer than 7 statementsMove it down, or remove it.
never apologisedThe last line isn't sorry everyoneAdd sorry everyone as the last line.
that file isn't a tissue. use .achThe file doesn't end in .achRename it to end in .ach.
Your program caught a TypeError. achoo.The sneezes were fine, but the Python inside them has a problemUse Debug or --python to see the Python, then fix it like normal Python.

14. Final quiz

One last check. If you get these right, you can write ACHOO.

Quiz 9: Everything
1. Which line prints the number 5?
2. A program has 15 statements. How many bless you lines does it need?
3. What is achOoooooO?
4. What does atchoo mean?
5. What's the easiest way to get a big ACHOO program right?