First Program in Python

Let’s start with the first Program in Python,to write a program you have to open your IDE, and here we are going to use IDLE as IDE for python for that,

  1. Go to start
  2. Search for IDLE
  3. And press Enter

#1 you should have installed python,so you can use Python IDLE,if you have not Click here for that procedure

We are not using Pycharm here we will use it later

First program in Python

Now just go and simply type 3+2 and press enter as shown in bellow figure:

Adding two number in python

If you have done any other programming before you can see that for adding two numbers there you have to write at least 5-7 lines of code and also have to worry about the errors and other stuff’s but see the beauty 😍 of Python you just need to type one line and your job is done.👍

As we have done addition operation you should try another stuff’s also like subtraction(-),multiplication(*),division(/),modulus(%,used for reminder’s)

and tell us if you face any difficulty in these stuffs

Programming in Python is so essay and fun, now if you want to let your program say ‘Hello world’ or your name it all is a matter of one line only,Let’s try it out

Hello world in python

You can see the easiness,simplicity and the beauty of the Python language

you just have to type print(‘ ‘)Hello Python

and between ‘  ‘ these quotes type whatever you want as a output.

and another way to print any string∗ is shown in the screenshot:






#String: String is the sequence of character’s,for example ‘‘ is a string,’Abhishek Tyagi’ is a string ‘your name’ or any word or sentence will be a string

Now an another question may be arise in your mind is that why you have used print(”) or some other stuffs in programming??? 🙄🙄

The answer to this question is very simple,suppose you have to send a message/e-mail or you simply talk to google assistant or other stuffs yo give them instructions to do things like send message, type a email, set alarm or other things.For that the computer system should be able to understand your words/instruction’s, And for that purpose they need to convert your words into a format the understand which is 0 and 1,for that purpose they have a compiler or interpreter for example in this case we have IDLE which is a interpreter,it’s converting our language into a computer understandable language so that it can work according to our commands.For more information on Computer languages visit here,

Hopefully you have enjoyed this if anyone has any question please let me  know in the comment section bellow:


Leave a Reply