16 — Check & Build: see the Python
This is the last guide of Part 1. Every sentence you have written so far was turned into a language called Python and run as that. Python is a language a great many people already use. This guide is about seeing that happen. You never have to read it — your programs work either way. It is here for the day you are curious, and for the day someone asks you for "the Python".
Steps
Open the writing box on needmoreeasy.com and type any program:
run it →show Hello world!Look at the Python panel on the right — on a phone, press the "Python" button above the box. It changes as you type:
print("Hello world!")One sentence always becomes one line of Python. The line numbers never shift, so when something goes wrong you can see which sentence caused it.
Put in something longer and read the two panels side by side:
run it →set score to 0 3 times add 1 to score show scoreThe Python panel shows
score = 0,for _ in range(3): score = score + 1andprint(score).copy and download above the Python panel take that Python away with you. A
.pyfile runs anywhere Python is installed, with no NME at all.Now get it wrong on purpose. Write
breakon its own, with no loop:breakThe Python panel turns into an error:
error[E0102]: `break` can only be used inside a loop 오류[E0102]: `멈춰`는 반복문 안에서만 쓸 수 있어요 --> program.nme:1:1 | 1 | break | ^^^^^ = hint: put it inside `while ... end` or `repeat ... end` = 도움말: `동안 ... 끝` 또는 `반복 ... 끝` 안에 넣어 주세요There are three things to read: what is wrong, which line (the
^marks), and what to try instead. It comes in both languages at once, so you can show it to anybody.A number like
E0102never changes. If the message does not help, copy the whole thing and show it to an AI — more accurately still if you first pasted one of the messages at the top of the site. Every number is also listed, with a one-line explanation, at the bottom of the syntax list.
Try it
Put each program you have written so far into the writing box and read the Python panel. Once you can see which sentence becomes which line, you are already half way into Python without having studied it.
If you installed it on your own computer (skip this for now)
Once install is done, the same things have commands.
nme check hello
nme build hello -o hello.py
nme en E0102
nme check looks without running, and prints nothing at all when the
program is fine — silence is success. nme build writes the Python to a file.
nme en E0102 (or nme ko E0102) explains that number in full. The short
forms are nme c and nme b.
What you learned
- The Python panel beside the writing box shows the Python as you type.
- One sentence is always one line of Python, and line numbers never shift.
- The Python can be copied or downloaded as a
.pyfile. - An error carries a number that never changes, a
^under the exact place, a hint, and both languages at once. - Installed,
nme check,nme buildandnme en <code>do the same jobs.