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

    If Statement Python – CBSE Class 12

    • Posted by Kabeer Sahib
    • Categories Computer Science

     If Statement in Python

    The simplest form of the if statement python tests a condition and check if the condition evaluates to true then it carries out some instructions otherwise and if the condition is false then it does nothing.

    Table of Contents

    Toggle
    •  If Statement in Python
      • Example –
        • Why if statement in Python?
        • You can check the latest CBSE syllabus for computer science Click here for syllabus OR Click here
      • Unit II: Computational Thinking and Programming – 1
      • Exam Time
        • Chapter : Bitwise Operators in Python
        • IMPORTANT QUESTIONS : Asked in examinations of Class 12th Computer Science

    In general form its syntax is shown below figure.

    if<conditional expression>:

        statement 1

        statement 2

    ————-

    ————-

    The if statement python

    Where statement may be a single statement, a compound statement or just a pass statement.

    Example –

                ch= input (“Enter a character”)

                        If ch>=0 and ch<=9:

                                Print (“you have entered a digit”)

    After getting input in Ch. the above code compares the value of Ch. if value of Ch. falls between the character 0-9, the condition evaluates to True, then it will execute statements in the if-body that means it will print the message saying “you have entered a digit”

    Similarly, let’s have an another example for more understanding

              ch=input (“please enter a character”)

              If ch == ”   ” :

                    Print (“you have entered a space”)

                          If ch>=’0’ and ch<=’9’

                                 Print (“you have entered a digit”)

     

    Read carefully the above code example and try to find out the result yourself.

    Now have a look in some other examples of conditional expression in if statement.

    If marks >=90:

        Print (“you did very well”)

    If a>b:

        Print (“a is bigger than b”)

    If x:

        Print (“x has truth value as true”)

     

    Why if statement in Python?

    In this tutorial, we have learnt about if statement in python for CBSE class 11 & 12 and its related concepts according to CBSE syllabus and this tutorial is useful for Central Board of Secondary Education (CBSE) student of class 11th and 12th  , who opted computer science (Code 083) as an optional subject. This topic is also very important to start learning python programing language for beginners of class 11th and 12th.

     

    You can check the latest CBSE syllabus for computer science Click here for syllabus OR Click here

    UNIT NO.UNIT NAMEMARKS
    1Computational thinking and programming40
    2Computer network10
    3Database management20
    4Practical30
    5Total100

     

    Unit II: Computational Thinking and Programming – 1

    According to the syllabus , Unit  II  Computational Thinking and Programming – 1 has  the above concepts for learning related to python Bitwise Operators in Python.

     

    Exam Time

    Chapter : Bitwise Operators in Python


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

    Tag:basics of python, Conditional and Iterative statements, free python, free python tutorial, Mohammad Amees, qissba, qissba technologies, qissba technology, The If-Statement in Python

    • 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

    Conditional statements - CBSE class12
    19 October 2022

    Next post

    If else statement python CBSE class 12
    20 October 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