Sunday, 22 November 2015

Beginning with Python - Important Note 1

Programming using IDLE(Python Gui), Shell mode.

Invoking the IDLE(Python GUI) brings up this window,

Type the following text to the right of the Python Shell and press the Enter key:
print("Hello Python!")

** If you are running new version of Python, then you would need to use print statement with parentheses like, print ("Hello, Python!"). However at Python version 2.4 -2.7 , print "Hello, Python!" is enough.
If you want to save the file, you can find it under File>Save> .

PROGRAMMING USING IDLE(PYTHON GUI) IN NEW WINDOW AND CREATING OUTPUT


In the Python Shell, File> New Window > , to open a new blank window named Untitled.
(Shortcut for opening new window in Windows is, CTRL+ N)
You can type the code you typed into the Python Shell, and save it by File>Save.
And you can run the above code by clicking on Run> Run Module

No comments:

Post a Comment