Back
  • Qissba
  • Courses

      CBSE Class 12

      PYTHON

      Computer Science

      • Python
      • Computer System Overview
      • Computer Networks
      • society Law & Ethics
      • Data Representation
      • Boolean Logics
      Python Online Free Courses for Classes 11th and 12th
  • Blog
  • Shop
    • Cart
    • Checkout
    • My account
  • About Us
  • Contact
  • Career
Have any question?
(+91) 09897990175
qissba@gmail.com
RegisterLogin
Qissba
  • Qissba
  • Courses

      CBSE Class 12

      PYTHON

      Computer Science

      • Python
      • Computer System Overview
      • Computer Networks
      • society Law & Ethics
      • Data Representation
      • Boolean Logics
      Python Online Free Courses for Classes 11th and 12th
  • Blog
  • Shop
    • Cart
    • Checkout
    • My account
  • About Us
  • Contact
  • Career

    Computer Science

    logical-operators-in-python

    Logical Operators in Python – CBSE class 11

    • Posted by Kabeer Sahib
    • Categories Computer Science

    Introduction

    In python programming, when you required to check more than one condition (comparison) in one statement, you can use Logical Operators. It means that the logical operators are used on conditional statements (either true or false).

    Hence, the Boolean Logical Operators are those that refers the ways these relationships among values can be connected.

    Table of Contents

    Toggle
    • Introduction
      • Types of logical operators
    • Exam Time
    • Chapter : Logical Operators

    Types of logical operators

    Python provides three logical operators to combine existing expressions the list of logical operations is following

      • and : Returns True if both operands are True.
      • or: Returns True if at least one operand is True.
      • not : Returns the opposite of the operand’s Boolean value.

    1. OR operators :

    OR operators combines two or more expressions which makes it operands.

    When OR operators has its operands as relation expression (q<p), then or operator performs as following principle.

    The OR operators evaluates to true if either of its (relation) operands evaluates to true, otherwise false if both operands evaluate too false.

    Logical OR Operater

     

    When or operators has its operands as number / string / list, then operators perform as per following principal.

     

    OR Operator in Python

     

    In an expression x or y, if first operands have false, then return second operands y as result otherwise return x.

     

    2. AND operator :

    The AND operator combines two expression which makes it operands

    When and operator has its operands as relation expression, then AND operators perform as per the following principal.

    Logical AND Operater

     

    The AND operator evaluates to true if both of its relational operands evaluate to true, and evaluates FALSE if both either or both operands evaluate FALSE.

    When AND operator has its as number OR string, list then AND operator performs as per following principal.

     

    Logical AND Operater

     

    In expression X&Y, if first operand has FALSE, then return first operand X as result, otherwise return Y.

    3. NOT operator:

    The Boolean / logical Not operator works on single expression or operand, that means it is a unary operation unlike AND and OR.

    Operation that can return string/number/list as result, returns always a Boolean value i.e., TURE or FALSE.

    If the expression is false and vice versa.

     

     

    Exam Time

    Chapter : Logical Operators


    IMPORTANT QUESTIONS : Asked in examinations of Class 12th Computer Science

    Q1. What are Logical Operators in python?
    Q2. What are three logical operators ?
    Q3. what are five logical operators in python?
    Q4. can we use logical operators in strings?
    Q5. What are logical operators used for?
    Q6. How many logical operators are there in python?
    Q7. Write the example of logical operators?
    Q8. which type of operands are permitted with logical operators?


    Read more

    • structure of module in python
    • arithmetic operators
    • operators in python
    • types of operators
    • logical operators
    • membership operators
    • standard library module
    • Identifiers in python

    Tag:basics of python, CBSE, class - 11, computer science, free python, free python tutorial, Logical Operators, Mohammad Amees, Operators in Python, python notes, qissba, qissba technologies, types of operators

    • Share:
    Kabeer Sahib

    A Trained Post Graduate Teacher with 10 years of experience and working as TGT/PGT–Computer Science including good Management and administration skills with managerial positions in previous work environments

    Previous post

    Arithmetic Operators in Python | CBSE - class 12
    8 July 2022

    Next post

    Identity Operators in Python - CBSE class11
    14 July 2022

    You may also like

    Operator Precedence & Associativity in Python | CBSE Class 11| Computer Science
    24 June 2025

    Dear Class 11th STUDENTS, ! Welcome to this tutorial of Operators in Python from your CBSE class 11 of …

    basics-of-python-programming-languages-cbse-class-11
    Basics of Python Programming Language | CBSE Class 11| Computer Science
    3 June 2025
    encoding-schemes-cbse-class-11-computer-science
    Encoding Schemes | ASCII | ISCII | Unicode | CBSE Class 11| Computer Science
    21 May 2025

    Leave A Reply Cancel reply

    You must be logged in to post a comment.

    Search

    Categories

    • Computer Science
    • Education
    • Education News
    Computer Science : Python – CBSE Class 11

    Computer Science : Python – CBSE Class 11

    ₹1,999.00Free
    Computer Science : System Overview – CBSE Class 11

    Computer Science : System Overview – CBSE Class 11

    ₹999.00Free
    Computer Science : Python – CBSE Class 12

    Computer Science : Python – CBSE Class 12

    ₹1,999.00Free

    Login with your site account

    Lost your password?

    Not a member yet? Register now

    Log in

    Copyright @ 2021 ! QISSBA EDUCATION ! .

    • Privacy
    • Terms
    • Sitemap
    • About Us

    Login with your site account

    Lost your password?

    Not a member yet? Register now

    Register a new account

    Are you a member? Login now