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

Control Structures in Python:
  • 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

    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 style of programming.


    About: Introduction to Python Course

    Introduction to Python:

    This course is to introduce the basics of the Python programming language.

    Python programming
                           
    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 style of programming.

    Python Operators

    Python Operators:
    • Operators are special symbols that 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.
    • 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.