■ CLASS 9 PYTHON ■
Introduction to Python
■ Most Repeated Exam Questions ■
■ Annual Exam Special ■
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
■ IMPORTANT NOTE ■
These questions are most frequently asked in Annual Exams based on analysis of 1000+ sample papers!
■ THEORY QUESTIONS - VERY SHORT ANSWER (1-2
Marks)
1■■ Who developed Python?
Answer: Guido van Rossum in 1991
2■■ What is Python?
Answer: Python is a high-level, interpreted, object-oriented programming language
3■■ What is IDLE?
Answer: IDLE is Integrated Development and Learning Environment for Python
4■■ What are Keywords?
Answer: Keywords are reserved words with special meaning (e.g., if, for, while, def)
5■■ What are Identifiers?
Answer: Identifiers are user-defined names for variables, functions, classes, etc.
6■■ Difference between Interactive Mode and Script Mode?
Answer: Interactive Mode executes one line at a time; Script Mode saves multiple lines in a file (.py)
7■■ What is a Variable?
Answer: A variable is a name given to a memory location to store data
8■■ What are Data Types?
Answer: Data types classify data - int (integers), float (decimals), str (text), bool (True/False)
9■■ What are Operators?
Answer: Operators are symbols that perform operations (+, -, *, /, %, **, //)
■ What are Comments in Python?
Answer: Comments are text ignored by interpreter. Use # for single-line comments
■ THEORY QUESTIONS - SHORT ANSWER (3-4 Marks)
1■■ What are the features/benefits of Python?
Answer:
• Easy to learn and read - Simple syntax
• Interpreted language - No compilation needed
• Platform independent - Works on Windows, Mac, Linux
• Large standard library - Built-in modules
• Object-oriented - Supports OOP concepts
2■■ Explain different types of operators:
Answer:
• Arithmetic: +, -, *, /, % (modulus), ** (power), // (floor division)
• Relational/Comparison: ==, !=, <, >, <=, >=
• Logical: and, or, not
• Assignment: =, +=, -=, *=, /=
3■■ What is Type Conversion? Explain types:
Answer:
• Implicit Type Conversion: Automatic conversion done by Python
Example: 5 + 2.5 = 7.5 (int + float = float)
• Explicit Type Conversion: Manual conversion using functions
Example: int('10'), float(5), str(100)
4■■ What are the applications of Python?
Answer:
• Web Development (Django, Flask)
• Artificial Intelligence & Machine Learning
• Data Science & Analytics
• Game Development
• Desktop Applications
5■■ Difference between print() and input() functions:
Answer:
• print(): Displays output on screen
Example: print('Hello')
• input(): Takes input from user
Example: name = input('Enter name: ')
■ CODE OUTPUT QUESTIONS (VERY IMPORTANT!)
■ Tip: Practice these on paper first!
Q1. What will be the output?
a = 10
b = 5
print(a + b)
print(a - b)
print(a * b)
Output:
15
5
50
Q2. What will be the output?
x = 5
y = 2
print(x / y)
print(x // y)
print(x % y)
Output:
2.5
2
1
Q3. What will be the output?
a = 10
a = a + 5
print(a)
Output:
15
Q4. What will be the output?
num = 2 * 3 - 4
print(num)
Output:
2
Q5. What will be the output?
x = 5
y = 10
z = x > y
print(z)
Output:
False
Q6. What will be the output?
a = True
b = False
print(a and b)
print(a or b)
print(not a)
Output:
False
True
False
■ MOST IMPORTANT CODING QUESTIONS
■ Note: Practice writing these programs!
Q1. Write a program to add two numbers:
a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) sum = a
+ b print("Sum is:", sum)
Q2. Write a program to find area of rectangle:
length = float(input("Enter length: ")) breadth = float(input("Enter breadth: ")) area
= length * breadth print("Area is:", area)
Q3. Write a program to convert Celsius to Fahrenheit:
celsius = float(input("Enter temperature in Celsius: ")) fahrenheit = (celsius * 9/5)
+ 32 print("Temperature in Fahrenheit:", fahrenheit)
Q4. Write a program to check if number is even or odd:
num = int(input("Enter a number: ")) if num % 2 == 0: print("Even") else: print("Odd")
Q5. Write a program to find the largest of three numbers:
a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) c =
int(input("Enter third number: ")) if a > b and a > c: print("Largest is:", a) elif b
> c: print("Largest is:", b) else: print("Largest is:", c)
■ MOST REPEATED MCQs
1. File extension of Python?
(a) .py ✓
(b) .pt
(c) .python
(d) .p
2. Symbol for single-line comment?
(a) //
(b) /* */
(c) # ✓
(d) --
3. Python is case-sensitive?
(a) Yes ✓
(b) No
(c) Sometimes
(d) Depends
4. Which keyword defines function?
(a) function
(b) def ✓
(c) fun
(d) define
5. Operator for exponentiation?
(a) ^
(b) **✓
(c) ^^
(d) pow
6. Operator for floor division?
(a) /
(b) %
(c) // ✓
(d) \
7. Which is NOT a data type?
(a) int
(b) float
(c) Loop ✓
(d) str
8. String can be enclosed in:
(a) Single quotes
(b) Double quotes
(c) Both ✓
(d) None
■ SUPER IMPORTANT TOPICS (100% REPEAT!)
Topic Importance Tip
■■■■■
Operators (Arithmetic, Relational, Logical) Practice all operators with examples
Data Types (int, float, str, bool) ■■■■■ Know conversion functions
Input/Output (print, input) ■■■■■ Understand type conversion with input
Type Conversion (Implicit vs Explicit) ■■■■ Write examples for both types
If-else statements ■■■■■ Practice coding questions
Output prediction ■■■■■ Solve on paper first!
■ EXAM PREPARATION TIPS
■ Practice ALL operators with different examples daily
■ Solve output questions on paper without using computer
■ Write basic coding programs at least 5 times each
■ Memorize difference between Keywords and Identifiers
■ Know all data types with proper examples
■ Understand Type Conversion - both Implicit and Explicit
■ Practice If-else coding questions thoroughly
■ Revise MCQs one day before exam
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
■ Yeh sab questions agar achhe se kar liye
toh 90% marks pakka! ■
■ ALL THE BEST FOR ANNUAL EXAM! ■
■ Practice Makes Perfect! ■