03. How to Write First Program in Python | Python Mastery Full Course

Introduction :

Hello Everyone, so in today’s post we are going to see how we write our first program in Python, because when we learn programming, it is most important here that how we write the best program, so today we will write our Python If you also want to learn, then please read this post till the end and read it carefully so that you understand everything correctly.

Installing Python Extension

Before Running the Python Program, You have to Install an Python Interpreter so that you can run all python programs Easily. To install Python Extension for VS Code, Just Go to Extension Tab in Visual Studio Code (which is located in left side of the Screen) and Then Search for “Python”, When You will search for python, then you will see an Python Extension on the top of the list Which is Created By Microsoft. From there, You can Install Python Extension by Clicking on Install Button.

How to Install Python Extension for Visual Studio Code

Writing Our First Program :

In Our First Python Program, we will try to print “Hello World” or any other Text in the Output

To print any text in Python, we have a command for that. that is “print”. So Using print command we can easily print any text in Python. Here is the Code :

print("Hello World")

After writing the print command, you have to open and close Bracket “( )” and then You have to write Double Quote between the Brackets. These Double quotes shows, this is a String (Text).

Running the Program :

After writing the complete code, you have to Run this Program to show the output.

To Run the Program, You have to just click on “Run” Tab (which is located on the top of the screen) and then you have to click on “Run without Debugging” and After that your program will be Run and you can see the output in the bottom of the screen.

How to Run Python Program

Summary :

So Friends, in this way you can write your first program in Python and now I hope you have understood it, so if you also want to learn Python programming, then you can follow us and subscribe to our YouTube channel CodeWithShani. Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *