Don’t I have to use [insert fancy computer] to code? No way! You can use any computer, tablet, or smartphone, it doesn’t even have to be connected to the internet. Though, some of the best resources are on the internet, for free.
Fun fact: if you have one, you can even code with a graphing calculator.
This is a hard question to answer because there are tons of places you can code. Let’s talk about a few different ones.
|Easy to Use
|Can save your work
This is an editor that comes with Python when you download it. (we’ll talk about downloading in a bit). It pretty much looks like a blank document that you can type in. You can type your code in, hit enter, and it will run your code. It looks like this. See the
>>>? That’s telling you where you can type. For now, you can ignore the first 3 lines of what probably looks like gibberish.
Note: IDLE does require that you download Python, which will require some space on your computer. We’ll cover how to install before we start coding.
Python Tutor is a free website you can use without logging in. It runs and helps visualize code. As you learn more things, I’ll explain what they should look like in Python Tutor. Personally, my vote is for everyone to start using this or something similar. For now, here is what Python tutor looks like when you go to Python Tutor
You don’t have to adjust any of the drop-down menus, the defaults are perfect. You can type where it says
1. This just means you are on line 1 of the code. As you type more, it will number each line of code.
There are two ways to use Python Tutor. With the first option, you may type all of your code, then click
Visualize Execution which allows you to click the
next button to see what happens at individual steps of your code.
The other option is to click
Live Programming Mode or go to Python Tutor Live. In this mode, your code will run as you type. I find this helpful as it immediately shows you what each step is doing.
Most of the work you do, while learning, will run perfectly on Python Tutor. Though, there are a few projects that will work better with Trinket.io.
Trinket.io is similar to Python Tutor in that it’s free and requires no downloads. It allows us to play with a few modules (already built code) that Python Tutor doesn’t support. You can choose to use Trinket for your projects if you want. Trinket does allow but doesn’t require you, to create an account that will save all of the code you build. If you choose not to create an account, you can use the editor on the Trinket.io webpage. The editor looks like the screenshot below.
To use the trinket editor, select and clear all of the code on the left. Then you can type in that area. Once you want to run, make your code do it’s thing, your code, click on the play symbol (▶). Once you’ve clicked ▶, the result of your code will show on the right.
We’ll use Trinket later in the Modules section to play with emojis, date and time, turtle drawing, graphs and charts, and Wikipedia.
That's great. If you know how, go ahead and use it. Python files end with
.py. If you don’t know how, I highly suggest using one of the above options. I find it’s easiest to learn just one thing at a time. Learning code and how to use the editor may become a bit stressful and overwhelming.
If you don't have an editor on your computer and want one, you may choose to install one like Atom from https://atom.io/.
Either way, most examples will be explained using Python Tutor.