Functions in Python basics

Functions In python:
  • Set of instructions to perform a specific task.
  • Below is the syntax of functions in python:
                   def function_name([arg1,....,arg n]):
                          statement 1
                          ........
                          statement n
                          [return value]
                   variable = function_name([value1,......,value n])

Control Structures

  • In general, Control structures decide the flow of the program execution.
  • The most commonly used control structures in python are
      • Sequential: control flows through all the statements, in the order of how the code is written.
      • Selection: Depends on the condition, control flows to the different statements.
      • Iteration: Certain blocks of code(statements) will be executed repeatedly.

    Basics of Python

    Code4tutorial basics of python
    • Python was created by Guido van Rossum in 1991 as a general-purpose programming language.
    • It is interpreted and interactive language. 
    • Python is an open-source language under a general public license (GPL). 
    • It supports both object-oriented and structured styles of programming.

    About: Introduction to Python Course

    Geek4Tutorial - Python Course
    Introduction to Python:
     
    This course is to introduce the basics of the Python programming language.
     
    About Python:
    • Python was created by Guido van Rossum in 1991 as a general-purpose programming language. It is interpreted and interactive language.
    • Python is an open-source language under a general public license (GPL). 
    • It supports both object-oriented and structured styles of programming.

    Python Operators

    • Operators are special symbols that are used to perform operations on the variables and the values.
    • Consider an expression 10 + 20 = 30. Here, + is an operator that performs addition. 10 and 20 are called operands and 30 is the output of the operation.
    • In general, the operand is a variable or a value that the operator operates on.
    • The most commonly used operator groups in python language are listed below
        • Arithmetic Operators
        • Comparison/Relational Operators
        • Logical Operators
        • Assignment Operators
        • Bitwise Operators
        • Identity Operators
        • Membership Operators
    • Let's have a look at each operator with their syntax.

    You might also like

    Deploy your Django web app to Azure Web App using App Service - F1 free plan

    In this post, we will look at how we can deploy our Django app using the Microsoft Azure app service - a free plan. You need an Azure accoun...