Starting Python

There are different way to access Python’s command line depending on the operating system installed on your machine:

⦁ If you’re using Windows, you can start the Python command line by clicking on its icon or menu item on the Start menu.
⦁ You may also go to the folder containing the shortcut or the installed files and click on the Python command line.
⦁ If you ‘re using GNU/Linux, UNIX, and Mac OS systems, you have to run the Terminal tool and enter the Python command to start your session.
Checking Whether Python is Installed
Open a terminal window by going to Application > Utilities > Terminal. You can also press COMMAND-spacebar, type terminal, and then press ENTER. To find out whether Python is installed, enter python with a lowercase p. You should see output telling you which version of python is installed on your system and a >>>prompt where you can start entering Python commands, like this:

To see how Python works, you can use the print command to print the universal program “Hello, World!”
1.Open Python’s command line.
2.At the >>>prompt,type the following;
3. Press enter to tell Python that you’re done with your command. Very quickly, the command line window will display Hello, World! on the following line:

Translate »