{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "Assignment python batch 6.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "toc_visible": true,
      "authorship_tag": "ABX9TyM1iRZ6jBW/7U0yIlDKsoy5",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/afroozkhan0143/Letsupgrade-python-/blob/master/Assignment_python_batch_6.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "HoGmJsb-KSX9",
        "colab_type": "text"
      },
      "source": [
        " Basic Syntax of Python\n",
        "​Back slash :  It is used for continuous statement \n",
        "      Ex :- print (\"Hello/\n",
        "                        Python\")\n",
        "Output : Hello Python\n",
        "2.  Triple Quotes :used to create doc string \n",
        "Ex :- print(\" \" \" This program is written by me  \" \" \")\n",
        "3.  String inside the quotes :\n",
        "Allowed to start and end a string literal with  single quotes like 'blah blah'\n",
        "Ex:- print (\"Python's World\")\n",
        "4. Escape sequence for string :\n",
        "Escape sequence is used to produce a space and go to next line by '\\t' '\\n'\n",
        "Ex:- print (\"Hello\\tPyhton\")\n",
        "Output:- Hello  Python\n",
        " print(\"Hello\\nPython\")\n",
        "Output:- Hello\n",
        "               Python\n",
        "5. Formatted output:\n",
        "formatting output is used to have one or more strings, floats and integers in one line\n",
        "Ex:- name = XYZ\n",
        "        marks=90\n",
        "        age= 20\n",
        "print(\"The name of the person is %s marks is %f age is %d\"%(name,marks,age))\n",
        "       Output:The name of the person is XYZ marks is 90 age is 20\n",
        " \n",
        "Python variables and assignment statement\n",
        "​Variable variable means linking of the data to name\n",
        "​According  to the data type the interpreter receives the memory space\n",
        "​Variable  refers to the memory location that contains the data\n",
        " Rules to define a variable\n",
        "A keyword cannot be used as a variable \"if \",\"def\" and \"for\", are the reserved keywords. They cannot be used as foes\n",
        "​A variable can contain letters \n",
        "​Python is a case sensitive and hence variables are also case sensitive\n",
        "​A variable cannot start with number\n",
        "​Aa variable is assigned to data by using the assignment operator.\n",
        " \n",
        " \n",
        "Python assignment statement\n",
        "We can use multiple statements\n",
        "<variable name>= <data>\n",
        "X = Y = Z = 10\n",
        " \n",
        "Python operators\n",
        "There are 7 types of python operators\n",
        "​Arithmetic operators\n",
        "​Comparison operators\n",
        "​Assignment operators\n",
        "​Bitwise operators\n",
        "​Logical operators\n",
        "​Membership operators\n",
        "​Identity operators\n",
        " \n",
        "​Arithmetic operators\n",
        "---> **   exponent performs exponential calculation on operators\n",
        "--> *   multiplication\n",
        "--> /   division\n",
        "--> %   modulus\n",
        "--> +   addition\n",
        "--> -  subtraction\n",
        "--> //  floor division means that after performing the division it returns the lower integer value as a result\n",
        "​Assignment operator\n",
        "-->  =  a=b , bhi is assigned to a\n",
        "-->  += a+=b is equal to a=a+b\n",
        "--> -= a-=b is equal to a=a-b\n",
        " --> *=   a*=b is equal to a=a*b\n",
        "--> /= a/=b is equal to a=a/b\n",
        "--> **=    a**=b is equal to a=a**b\n",
        "​Bitwise operators\n",
        "|        Bitwise OR operation\n",
        "&       Bitwise AND operation\n",
        "-         BINARY ONES COMPLEMENT \n",
        "^         BITWIES XOR OPERATION\n",
        "<< BINARY LEFT SHIFT OPERATOR,  THE LEFT HAND OPERAND BIT IS SHIFTED  TO THE LEFT BY THE NUMBER ON THE RIGHT  \n",
        ">> BINARY RIGHT SHIFT OPERATOR,  THE RIGHT HAND OPERAND BIT IS SHIFTED  TO THE RIGHT BY THE NUMBER ON THE RIGHT\n",
        "​Logical operator:\n",
        "And  If both sides are true then the AND Operator returns true\n",
        "Or  if any side is true then Or operator returns true\n",
        "Not the not operator inverts the outcome of the condition in the not operator returns true,then the not operator makes it false, vice verse.\n",
        "​Membership operators\n",
        "in      If the specified operand is found in the sequence then the 'in' Operator returns true otherwise it returns false\n",
        "not in        If the specified operand is not found in the sequence then the 'not in' Operator returns true otherwise it returns false\n",
        "​Identity operators\n",
        "is  if two variable refer to the same memory locations then the  \"is\" operator returns true otherwise it returns false\n",
        "is not  if two variable refer to the same memory locations then the  \"is\" operator returns false otherwise it returns true"
      ]
    }
  ]
}
