First-program-in Python .

In this session i have discussed hello world program in Python .

Here we will know how to write the firt hello world python program .

Before write the first program you must be install the python in your computer. We have done installation process.

There are three ways by which you can write the python program as follows .

1-By using command prompt

2-By using script file

3-By using IDE (Integrated Development Environment like pycharm)

1-By using command prompt

First of all open the run and type python it will show you three option as follows

1. IDLE(python 3.7 32-bit)

2. Python 3.7(32-bit)

3. Python 3.7 Module Docs(32-bit)

Select the second option Python 3.7(32-bit). It will open the python prompt and write the print("Hello") and press enter key. It will print the hello on next line like below.

python image

2-By using Script file

First of all open the notepad and write the program like below . You need to save this file as The extension of python is .py.

     print("Hello World")         

a)Right click on python file and pop will display click on Edit with IDLE. Python file will display press F5 for execute the program.

b)Open command prompt and give the location of your file (c:\\Users\Abhishek-PC\desktop> press enter it will print Hello World. My python file is present at desktop so i have given the desktop location.

    OUTPUT : Hello World

3-By using IDE (pycharm)

First of all you have need to download the pycharm .

Click on this link for download the pycharm click here .

To execute installer double click on installer(.exe) and click on next at each step.

Click on file->new-project-> a dialogbox will display give the project name and location .

Your project will display under project pane it is at left side. Right click on your project a pop will display click on new and select the python file where you need to give your python file name.

After that write the below code on working area of pycharm .

    print("Hello World")  
    OUTPUT : Hello World

This is screenshot of pycharm first program.

python image

Welcome to AndroidATPoint.

back image                     next image