Chapter 5 · Class 11 · CBSE · Science Computer Science
Getting Started with Python
25 practice questions · 5 marks weightage
Topics in this chapter
- Python Basics and Interpreter Modes
- Identifiers, Keywords and Tokens
- Variables and Dynamic Typing
- Data Types and Type Conversion
- Operators and Expressions
- Input and Print Functions
- Errors, Comments and Indentation
- Modules and Library Functions
Cheat sheet
Cheat SheetPractice questions
- Question 1Q-F2CDCDSee the answer and solution
In Python's interactive mode, what does the prompt >>> generally indicate?
- A.Python is ready to receive a command
- B.Python has detected a syntax error
- C.A Python program has finished execution
- D.Python is displaying the value of a variable
- Question 2Q-7F3F6FSee the answer and solution
What will be printed when the following Python code is executed and the user enters 12 on the first line and 3 on the second line? a = input() b = input() print(a + b)
- A.15
- B.123
- C.12 3
- D.A TypeError is raised
- Question 3Q-9E0268See the answer and solution
Explain the difference between a syntax error and a runtime error in Python, and give one example of each.
- Question 4Q-30D862See the answer and solution
Which of the following is a valid Python identifier?
- A.2total
- B.total-value
- C.total_2
- D.class
- Question 5Q-7D64CDSee the answer and solution
What is the output of the following Python code? x = 7 y = 2 print(x // y, x % y)
- A.3 1
- B.3.5 1
- C.4 0
- D.3 0
20 more questions on Getting Started with Python
Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed