gerconcierge.blogg.se

Write program
Write program











write program

We usually abbreviate it as REPL, R-E-P-L. This is referred to as a Read-Evaluate-Print Loop. Python reads the code that you’ve entered at the prompt-that’s, again, the thing with the three different little greater than ( >) symbols- and then it evaluates the code.Ġ2:09 Python will print the result and wait for more input.

write program

Every time that you run code in the interactive window, a new prompt is going to appear directly below the result.Ġ1:55 When using the interactive window, it works as a loop and includes these three different steps. Python evaluates this expression of 1 + 1 and displays 2, and then it displays yet another prompt just below that. This spot over here, this is called the prompt, and it’s where you’re going to be able to type code.Ġ1:27 So right in front of this cursor prompt, go ahead and type in 1 + 1 and then hit Enter.

write program

The text shows the version of Python that IDLE is running and some of the commands you can use to get help or view information about Python. You can type a bit of Python code into the interactive window and press Enter to immediately see the result, hence the name interactive.Ġ1:08 When the window opens up, it’ll display this same text at the beginning. You can see this name up here, IDLE Shell.Ġ0:55 It’s a textual user interface used to interact with the Python language. IDLE’s interactive window contains a Python shell. So in my case, I have several versions of Python here, and I’m going to choose Python 3.10 and double-click on the IDLE app. You can find it in the folder that the application was installed in. All right, let’s take a look at the interactive window.Ġ0:31 If you don’t already have IDLE open, then go ahead and open it. Then the editor window, which is where you actually write scripts and programs that you’ll save and run later. The first is called the interactive window, and I’ll share that in just a second. It’s called IDLE, which stands for Integrated Development and Learning Environment.Ġ0:13 It has two main windows, and you’ll spend some time in both of them. It’s time to get started writing your Python script.Ġ0:05 You’re going to be using a program that comes with your installation of Python.













Write program