Short Bite : – Today at PythonLovers we will show you How To Run Python’s Idle.
If You Dont Know About Python Then Read This Article First :- Introduction To Python Programming
The easiest way to get started is to run Python as an interpreter, which behaves likes a basic calculator. In the interpreter, you type a command, and Python produces the answer. Then you type another command, which again produces an answer, and so on.
In OS X or Linux, to start the Python interpreter is as simple as typing the command python on the command line in a terminal shell. In Windows, assuming that Python has already been installed, you need to find Python in the appropriate menu. Windows users may choose to run
Python in a command shell (i.e., a DOS window) where it will behave very similarly to Linux or OS X.
For all three operating systems (Linux, OS X, Windows) there is also an integrated development environment for Python named IDLE. If interested, you may download and install this on your computer in pythonlovers.net/tools
Once Python starts running in interpreter mode, using IDLE or a command shell, it produces a prompt, which awaits for your input. For example, this is what I get when I start Python in a command shell on my windows box:
The three symbols >>> indicates the prompt awaiting my input.
So experiment, using the Python interpreter as a calculator. So play with Python as much as you like, it’s just like a calculator. The symbols are the same. Addition = +, subtraction = – , multiplication = *, division = / and exponent = ** base**power
Here is another code using ** symbols:
Practice until you understand the IDLE!
You can calculate using different symbols together in 1 line
Just like this:
Python’s IDLE built in TEXT EDITOR
Now the Python’s idle comes in with a built-in text editor. The text editor displays text in a good manner, syntax highlighting, comments, literal texts, python keywords and so much more are displayed in various colours and fonts, this gives your python code a new fresh look, it makes your code to become easy to read and helps you to find errors quickly with the syntax highlighting.
Go on and open your python idle and click the FILE option:
Click on new file and an empty text editor will pop up:
Saving your code!!!!!
Go on your untitled window type in “print(Hello World)”as below:
After typing click the file option then click save button:
Give your file a name and make sure the save as type its at “.py, pyw” extension:
Click save and you are done. Next click on run or press “F5” to run your code:
Then the idle will pop up and execute your code:
If you want to run your code all over again, go to the folder that you saved your .py file and right click on it then hit the edit button.The idle text editor will open your code:
This Is How The Python’s Idle works and How To Run Python’s IDle.