First Python Program

In this tutorial, we code our first python program. Let us execute programs in different modes of programming.

Code using Online Editor

We use an online interpreter called We can use it without downloading python or any software on our PC.

Open then login using your credential or sign up as a new user.

In this online interpreter, you can change the screen mode as dark or light, font size, layout, etc.

Write the below code and press the run button on the top.

print(‘Hello World’)


Hello World

Code using Command Line

Open cmd.exe from Windows Start button or search Command Line in search bar and follow below steps.

  1. Type python


you get below as output:

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52)
[MSC v.1916 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

  1. Now Python interpreter has started, we can write our code:

>>> print(‘Hello World’)

  1. Press Enter for output. Output for the line of code:

Hello World

Scroll to Top