First Code in Python.



In this post we are going to start actual coding in Python. Let's start..!

Before starting you must have Python installed in your desktop or laptop and along with this you also need an IDE as well. If you have any doubts with IDE and How to install Python in your computer. Then please first check my previous post. And complete all steps as I mentioned there. 
Or simply Click here.  to check previous post. 

First learn something..!
If you want to write python code you should create a python and how you will create this python file ? It's very simple.! 

1} Open IDE you have for example VS Code. Here I am using VS Code.
    And click on New file.





2} Click on File ( left upper corner ) and click on Save As.


  



3} Give any name to file here I am giving name as FirstCode.py . Here you have to know some rules of creating python file.

        1] Extension of your file should be .py because we want python file. We have so many extensions for example , .txt  .pdf  .doc , But this will not work your extensions should be .py only. 
        2] Your file name should not have any space in between. You can use underscore ( _ ) character instead of space there.


        


Now you have a python file created. Let's start with actual coding. 

First code is very simple. Print "Hello world..!" .

To print anything on console ( screen ) we use  print() function, This is built in function in python.
Let's use that 

Your text should be in double cote for example  print("Hello world..!") 




Now right click on screen and click on Run Python File in Terminal.

 
 


And here is the final result.




Try something of your own. 
If you have any doubts in this post please ask in comment section below.


What is variables in python ? How we can create variable ? Why we need variables ? that we see in next post.

If you like these post and you have learned something from this then share this post with your friends and family..

Keep learning always.....!!! 😇😇😇






Previous Post  Next Post