Any2Quiz
Quizzes / CBSE / Class 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.

This CBSE Class 9 ICT practice quiz has 19 multiple-choice questions on Python Basics, and 19 of them come with an explanation. Try the 5 sample questions below (tap an option to check yourself), then play the full quiz online. No sign-up needed.

Start quiz: 19 questions, free

Sample questions

  1. What is a variable in Python?

    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?

    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?

    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?

    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?

    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

More questions in this quiz

Answers and explanations are in the full quiz.

  1. Which of the following is not a valid variable name in Python?
  2. How do you create a list in Python?
  3. What function do you use to output data to the screen in Python?
  4. Which of the following data types is immutable in Python?
  5. What is 'PEP 8' in Python?
  6. Which of these operators is used for floor division in Python?
  7. Given a string 'Hello World', what will str[0:5] return?
  8. What will be the output of the expression 3 ** 2 in Python?
  9. What is the output of print(type(3.0)) in Python?
  10. How do you start a function definition in Python?
  11. Which keyword is used for function definition in Python?
  12. What is the output of print('Hello' + 5) in Python?
  13. What does the built-in function ord() do in Python?
  14. How do you define an empty set in Python?

Browse all Programming using Python quizzes

More to play

Daily ChallengeA new quiz every day. Keep your streak.HangmanGuess the word, letter by letter.Story QuestLearn through short interactive stories.All quizzesCBSE, ICSE, competitive exams and more.