Any2Quiz
CBSE / 9 / ICT / Programming using Python

Python Basics Quiz - CBSE Class 9 ICT

Free practice quiz: Python Basics (CBSE Class 9 ICT). 19 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

Play all 19 questions free

Sample questions

  1. What is a variable in Python?

    1. A reserved memory location to store values
    2. A function name
    3. A Python keyword
    4. A data type
    Show answer

    Answer: A. A reserved memory location to store values

    Variables in Python are used to store values. They act as reserved memory locations.

  2. Which of the following is used to create a comment in Python?

    1. // This is a comment
    2. /* This is a comment */
    3. # This is a comment
    4. <!-- This is a comment -->
    Show answer

    Answer: C. # This is a comment

    In Python, comments start with a # symbol.

  3. Which of the following correctly imports the math module in Python?

    1. import math
    2. #import math
    3. $import math$
    4. <import math>
    Show answer

    Answer: A. import math

    To use the math module in Python, you import it using the 'import' keyword.

  4. Which of the following methods is used to add an item at the end of the list in Python?

    1. insert()
    2. append()
    3. extend()
    4. add()
    Show answer

    Answer: B. append()

    The append() method adds an item to the end of a list.

  5. Which keyword is used to declare a variable globally when inside a function?

    1. global
    2. var
    3. let
    4. public
    Show answer

    Answer: A. global

    The 'global' keyword is used to declare variables globally, allowing their usage both inside and outside functions.

Take the full quiz

Browse all Programming using Python quizzes