Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 15, 2021 05:02 pm GMT

Where do I code?

Dont I have to use [insert fancy computer] to code? No way! You can use any computer, tablet, or smartphone, it doesnt 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.

Okay, Cool, but Where on my computer can I code?

This is a hard question to answer because there are tons of places you can code. Lets talk about a few different ones.

FreeEasy to UseVisualizeCan save your workOnlineRequires download
IDLE
PythonTutor.com
Trinket.io

IDLE

This is an editor that comes with Python when you download it. (well 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 >>>? Thats telling you where you can type. For now, you can ignore the first 3 lines of what probably looks like gibberish.
Screenshot of Python 3.7.3 Shell. It shows 3 lines of text at the top, then a mostly blank line with ">>>" at the beginning
Note: IDLE does require that you download Python, which will require some space on your computer. Well cover how to install before we start coding.

Python Tutor

Python Tutor is a free website you can use without logging in. It runs and helps visualize code. As you learn more things, Ill 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 dont 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.
screenshot of Python Tutor showing the dropdown with the python version, the text box to write in, and the buttons "Visualize Execution" and "Live Programming Mode"
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

Trinket.io is similar to Python Tutor in that its free and requires no downloads. It allows us to play with a few modules (already built code) that Python Tutor doesnt support. You can choose to use Trinket for your projects if you want. Trinket does allow but doesnt 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.
screenshot of Trinket.io editor. Editor shows a Turtle program that draws the trinket.io logo
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 its thing, your code, click on the play symbol (). Once youve clicked , the result of your code will show on the right.

Well use Trinket later in the Modules section to play with emojis, date and time, turtle drawing, graphs and charts, and Wikipedia.

What if I already have a code editor or want one?

That's great. If you know how, go ahead and use it. Python files end with .py. If you dont know how, I highly suggest using one of the above options. I find its 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.


Original Link: https://dev.to/vickilanger/where-do-i-code-3cb2

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To