Python - Learn python from very basic , How to write comments in python , python keyword


Table of Content

     What is Python ?

               The Python programming language is one of the fastest growing and most in-demand programming languages today. Python is often used as a secondary or supplementary language, but it's also quite common to see it being used as the main programming language for specific projects. 

    This article will help you get started with Python and understand why it’s so popular. It will also guide you through different examples and exercises to help you to comfortable with this programming language. Let’s begin!            

     Python is general purpose , high level ( human readable ) , interpreted and dynamical programming language created by Guido Van Rossum . Python code is saved and executed in the same format in which you created the script , as opposed to compiled languages 

                                          


    where the code is first translated to a set of machine specific instructions and then saved as executable file . Being dynamical means that the python interpreter automatically indentifies the type of variable on the basis of what kind of data you have assigned variable .

    Why learn Python?

    The current job market is extremely competitive, and the best way to stand out is to have skills that are valuable in the job market. Python has become a very popular programming language in recent years, and has become the language of choice for data science, machine learning and artificial intelligence projects. This means that Python programming skills will likely be relevant and useful for years to come.


    As Python is simple to understand for beginners, it also makes a great language to learn for those seeking to become professional developers. It is important to note that Python is used in many areas (web development, data science, AI, etc.), so it’s important to have a specific focus when learning Python .

    What can be done usingPython ?

    • System Programming
    • Graphical User Interface(GUI)
    • Web Scripting
    • Component Integration
    • Database Programming
    • Rapid Prototyping
    • Numeric and Scientific Programming
    • Gaming
    • Robotics

    Installing Python:

    Before you begin learning Python, you’ll need to install it on your computer or device. To do this, you can follow the steps below:

    1. Choose a Python version: There are currently two major versions of Python: Python 2 and Python 3. Most Python tutorials and courses will use Python 3 as the standard programming language, so you should choose this version.
    2. Choose an IDE: IDE stands for “integrated development environment”, and is a piece of software that supports the development of applications. Python comes with a built-in IDE named IDLE which is sufficient for beginners.
    3. Install a virtual environment: A virtual environment is a self-contained environment in which you can install additional Python libraries that are not part of your system-wide libraries. This allows you to use the same Python version across all of your projects.
    4. Install an editor: An editor is a piece of software that helps you write code, navigate through files and run Python code. It is recommended that you use an editor in order to save time and avoid potential syntax errors.

              Download Python On your Device [ Click Here ]


    Hello world in Python:

    As with every programming language, you should start with the classic “Hello, World” example. In Python, you can create a simple “Hello, World” program with the following code:


    • Python has in build function for showing result or something else on the screen that is print() . Lets run our first basic programming "Hello World !" using print() function .


     print("Hello World !")  #this is first program
     >>>Hello World !  
    

    This program will output the following text: “Hello, World”.


    Here’s a breakdown of the different parts of this code:

    Comments - Comments are not executed by the computer, but are there for you, the programmer, to either explain or give context to your code.
    print (string) - The print function simply prints out the specified string.


    Python has 33 Keywords :

    Keywords are the words whose meaning has already been explained to the Python's  Integrated Development and Learning Environment (IDLE)  . There are some keywords available in Python as shown in the  table below,

    Python keyword
    False class is
    finally None continue
    for lamda return
    True def from
    del global not
    while as eli
    if or with
    assert else import
    pass yield break
    except in raise

    How to write comments in python Programming Language

     Python Comments for single line: 

    Comments are necessary for any programming language for understanding the source code .

    • Python Comments begin with # .
    Example :
     Input :  
     >>>print(2+3+5) # adding three numbers  
     Output :  
     >>>10  
    

    How to write multi line comment in Python :

    • Multi-line comments should be written in a pair of ''' or """ .
    Example :
     Input :  
     >>>""" This is multi-line comments  
     >>> Author: Lite Edu  
     >>> date : Mar 2021 """  
     >>>print("Hello World !") # printing hello world  
     >>> ''' Here I am adding two numbers  
     >>>using print() function .'''  
     >>>print(50+60)  
     Output :  
     >>>Hello World !  
     >>>110  
    

    Conclusion:

    The Python programming language is one of the fastest growing and most in-demand programming languages today. It is simple to understand for beginners, and also used to create complex web applications, computer programs and many other types of projects. Learning Python will help you master a valuable skill that is highly prized by employers and has many different applications. For more update further in later , please bookmark the website . Keep Learning & keep supporting 😊

    Next->   Python Operators and Conversions

    Share:

    2 Comments

    For query , suggestion and others , please comment below. Don't share external link or spam on comment box . 💌

    Previous Post Next Post