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, freeSample questions
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.
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.
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.
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.
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.
More questions in this quiz
Answers and explanations are in the full quiz.
- Which of the following is not a valid variable name in Python?
- How do you create a list in Python?
- What function do you use to output data to the screen in Python?
- Which of the following data types is immutable in Python?
- What is 'PEP 8' in Python?
- Which of these operators is used for floor division in Python?
- Given a string 'Hello World', what will str[0:5] return?
- What will be the output of the expression 3 ** 2 in Python?
- What is the output of print(type(3.0)) in Python?
- How do you start a function definition in Python?
- Which keyword is used for function definition in Python?
- What is the output of print('Hello' + 5) in Python?
- What does the built-in function ord() do in Python?
- How do you define an empty set in Python?
Browse all Programming using Python quizzes