
- #Thonny number lines how to
- #Thonny number lines code
- #Thonny number lines free
Get ready to write your first official Python program in Thonny:Įnter the following code into the code editor: You’ll use the stop icon later in the tutorial. This can be particularly useful if, let’s say, your code runs a program that opens a new window, and you want to stop that program. J: The stop icon allows you to stop running your code. This is useful in the instance when you no longer want to go step by step through the code, and instead want your program to finish running. I: The resume icon allows you to return to play mode from debug mode.
The H arrow tells Python to exit out of the debugger. The G arrow tells Python to take a small step, meaning diving deep into each component of an expression. The F arrow tells Python to take a big step, meaning jumping to the next line or block of code. You’ll notice as you hit each arrow, a yellow highlighted bar will indicate which line or section Python is currently evaluating: These icons are used after you press the bug icon. This can be very useful when you’re debugging or, in other words, trying to find those nasty bugs in your code. By the way, if you’re wondering why they’re called bugs, there’s also a fun story of how it came about!į-H: The arrow icons allow you to run your programs step by step. You’ll work with this later in the tutorial. Thonny’s bug button is typically used to spot and investigate bugs. Bugs can come in many forms, sometimes appearing when you use inappropriate syntax and sometimes when your logic is incorrect. It’s inevitable that you will encounter bugs when you’re writing code. Running your code means you’re telling Python, “Do what I told you to do!” (In other words, “Read through my code and execute what I wrote.”)Į: The bug icon allows you to debug your code. Remember that the code you write is meant to be executed. You’ll use this later to save your first Thonny Python program.ĭ: The play icon allows you to run your code. This might be useful if you come back to a program that you worked on previously.Ĭ: The floppy disk icon allows you to save your code. You’ll use this button later in the tutorial to create your first program in Thonny!ī: The open folder icon allows you to open a file that already exists on your computer. Typically in Python you want to separate your programs into separate files. Working our way from left to right, below is a description of each of the icons in the image.Ī: The paper icon allows you to create a new file. We will use these letters to talk about each of the icons: You’ll see an image of the icons below, with a letter above each one. The IconsĪcross the top you’ll see several icons. The bottom half is your Shell, where you will see outputs from your code.
The top section is your code editor, where you will write all of your code. Notice the two main sections of the window. You should see a window with several icons across the top, and two white areas: Now that you have Thonny installed, open the application. In this section, you’ll learn about each of the features of the UI that’ll help you use each of the tools in your Thonny toolbox. Your workroom contains a toolbox containing many tools that will enable you to be a rock star Pythonista. Think of Thonny as the workroom in which you will create amazing Python projects. Let’s make sure you understand what Thonny has to offer. Specifically, it has a built-in debugger that can help when you run into nasty bugs, and it offers the ability to do step through expression evaluation, among other really awesome features.
#Thonny number lines free
Thonny is a free Python Integrated Development Environment (IDE) that was especially designed with the beginner Pythonista in mind.
#Thonny number lines how to
How to use Thonny to write and run your codeīy the end of this article, you’ll be comfortable with the development workflow in Thonny and ready to use it for your Python learning. How to navigate Thonny’s user interface to use its built-in features. This article will discuss an awesome tool called Thonny that will enable you to start working with Python in a beginner-friendly environment. Watch it together with the written tutorial to deepen your understanding: Thonny: The Beginner-Friendly Python EditorĪre you a Python beginner looking for a tool that can support your learning? This article is for you! Every programmer needs a place to write their code. Watch Now This tutorial has a related video course created by the Real Python team.