Python Programming: 10-Mark University Exam Questions Revision Sheet
This sheet contains 15 handpicked, high-weightage 10-mark questions covering Units II to V. Each question
helps in answering related 2-mark and 5-mark questions.
---
Unit II: Control Structures & Loops
1. Explain control structures in Python with examples.
Control structures determine the flow of execution. Types:
- Sequential: Straight-line code.
- Selection: if, if-else, elif
- Iteration: while, for
Example:
x = 10
if x > 5:
print("Greater")
2. Discuss different types of selection control statements with examples.
- if, if-else, if-elif-else
Example:
n=3
if n > 0:
print("Positive")
elif n == 0:
print("Zero")
else:
print("Negative")
3. Explain iteration in Python using for, while, and nested loops.
- for: used with sequences
- while: based on a condition
- nesting: loop inside another
Example:
for i in range(3):
print(i)
4. Differentiate between break, continue, and pass with examples.
- break: exits loop
- continue: skips iteration
- pass: does nothing
Example:
for i in range(5):
if i == 2: continue
print(i)
5. Write about Boolean expressions and operator precedence.
- Boolean operators: and, or, not
- Precedence: not > and > or
Example:
x = 10
y = 20
print(x < y and y < 30)
---
Unit III: Functions & Scope
6. Explain functions in Python: definition, types (value-returning & non-returning).
Example:
def greet():
print("Hello")
def add(a, b):
return a + b
7. Discuss parameter passing: actual vs formal, mutable vs immutable.
- Actual: values given in call
- Formal: parameters in definition
- Mutable (list), Immutable (int)
8. Explain local and global scope in Python.
Example:
def func():
a = 10 # local
x = 5 # global
9. Write about built-in functions in Python.
Common built-in functions: len(), sum(), type(), range()
Example:
print(len([1,2,3]))
10. Describe recursion with factorial example.
Example:
def factorial(n):
if n == 1:
return 1
return n * factorial(n-1)
---
Unit IV: Turtle, Modules & Objects
11. Explain software objects in Python.
- Object = data + behavior
- Created from class
Example:
class Car:
def __init__(self, model):
[Link] = model
12. Write about Turtle graphics and attributes.
- Module: import turtle
- Commands: forward(), right(), color()
Example:
import turtle
t = [Link]()
[Link](100)
[Link](90)
13. Explain modular programming and top-down design.
- Modular: divide program into functions/modules
- Top-down: design from main to detailed steps
14. Describe modules: creation, import, and usage.
- import module_name
- from module import func
Example:
import math
print([Link](16))
---
Unit V: OOP & Data Structures
15. Discuss Encapsulation, Inheritance, and Polymorphism in Python.
- Encapsulation: bundling data and methods
- Inheritance: class reuse
- Polymorphism: same interface, different behavior
Example:
class Animal:
def sound(self):
print("Animal sound")
class Dog(Animal):
def sound(self):
print("Bark")
---
Tip: These 15 questions are commonly repeated in university exams. Mastering them will help you handle
related short questions too.