Exercise Solutions Available
Step-by-step answers for all textbook questions in this chapter
Problem Solving and Python Programming — TN Class 11 CS Exercise Solutions
Complete exercise solutions for the Tamil Nadu Board Class 11 Computer Science chapter Problem Solving and Python Programming. Covers algorithms, flowcharts, pseudocode, and Python basics with code examples.
How to Use This Page
1. Attempt each exercise on your own first — write algorithms and draw flowcharts before checking answers. 2. Trace algorithms step by step — use sample inputs and manually follow each step. 3. Practice drawing flowcharts — use correct symbols (oval, parallelogram, rectangle, diamond). 4. Type and run Python code — verify your programs in IDLE or any Python editor. 5. Note your errors — maintain a mistake notebook for revision before the exam.
Key Concepts (Quick Recap)
| Concept | Details |
|---|---|
| Problem Solving Steps | 1. Understand the problem 2. Develop an algorithm 3. Write the program 4. Test and debug |
| Algorithm | A finite, step-by-step procedure to solve a problem with clear input, output, and unambiguous steps |
| Pseudocode | An informal, human-readable description of an algorithm using English-like statements |
| Flowchart | A diagrammatic representation using standard symbols to show the flow of an algorithm |
| Flowchart Symbols | Oval = Start/End, Parallelogram = Input/Output, Rectangle = Process, Diamond = Decision |
| Top-Down Design | Breaking a complex problem into smaller sub-problems (modular approach) |
| Python | High-level, interpreted, dynamically typed, platform-independent programming language |
| Python Features | Simple syntax, interpreted execution, dynamic typing, open-source, rich libraries |
| Python IDEs | IDLE (default), Jupyter Notebook, PyCharm, VS Code |
| Python modes | Interactive mode (>>> prompt, line-by-line) and Script mode (save and run .py files) |
Python Basics — Code Examples:
# Printing output
print("Hello, World!") # Output: Hello, World!
print("Sum =", 5 + 3) # Output: Sum = 8
# Variables
name = "Student"
age = 16
height = 5.6
# Input from user
x = int(input("Enter a number: ")) # Reads integer input
s = input("Enter your name: ") # Reads string input
# Multiple output
print("Name:", name, "Age:", age)
# Simple arithmetic
a = 10
b = 3
print(a + b) # 13 (addition)
print(a - b) # 7 (subtraction)
print(a * b) # 30 (multiplication)
print(a / b) # 3.333... (true division)
print(a // b) # 3 (floor division)
print(a % b) # 1 (modulo)
print(a ** b) # 1000 (exponentiation)
I. Choose the Best Answer (MCQs)
Q1. Which symbol is used for a decision in a flowchart? (a) Rectangle (b) Parallelogram (c) Diamond (d) Oval
The diamond symbol represents a decision point in a flowchart where the flow can branch based on a condition (Yes/No or True/False).
Q2. An algorithm must have: (a) Infinite steps (b) Ambiguous steps (c) Finite number of steps (d) No output
An algorithm must terminate after a finite number of steps. Infinite loops or never-ending procedures are not valid algorithms.
Q3. Python is a: (a) Low-level language (b) High-level language (c) Machine language (d) Assembly language
Python is a high-level programming language — its syntax is close to human language, it handles memory management automatically, and it is platform-independent.
Q4. The input() function in Python returns a value of type: (a) int (b) float (c) str (d) bool
The input() function always returns a string. To get a number, you must convert it explicitly using int() or float().
Q5. Which flowchart symbol is used for input/output operations? (a) Rectangle (b) Diamond (c) Parallelogram (d) Circle
The parallelogram represents input (reading data) and output (displaying results) operations in a flowchart.
Q6. Top-down design means: (a) Solving from bottom to top (b) Breaking a problem into smaller sub-problems (c) Writing code without planning (d) Testing before coding
Top-down design is a problem-solving approach where a complex problem is broken down into smaller, more manageable sub-problems, which are solved individually.
Q7. The default IDE that comes with Python is: (a) PyCharm (b) VS Code (c) IDLE (d) Jupyter
IDLE (Integrated Development and Learning Environment) is the default IDE that comes bundled with Python installation.
II. Fill in the Blanks
1. An algorithm is a step-by-step procedure to solve a problem. 2. The diamond symbol is used to represent a decision in a flowchart. 3. The oval symbol represents the start and end of a flowchart. 4. Python was created by Guido van Rossum. 5. In Python, the print() function is used to display output on the screen. 6. The input() function always returns a value of type string (str). 7. To convert a string input to an integer, we use the int() function. 8. A flowchart is a diagrammatic representation of an algorithm. 9. The process of finding and fixing errors in a program is called debugging. 10. Python executes code line by line in interactive mode. 11. The parallelogram symbol in a flowchart represents input/output operations. 12. A pseudocode is an informal description of an algorithm using English-like statements. 13. To run a Python program saved as a file, we use script mode. 14. The type() function in Python returns the data type of a variable.
III. True or False (with corrections for false statements)
input() function returns an integer by default.IV. Match the Following
| Column A | Column B |
|---|---|
| 1. Oval | (e) Start/End |
| 2. Parallelogram | (a) Input/Output |
| 3. Rectangle | (d) Process |
| 4. Diamond | (b) Decision |
| 5. Arrow | (c) Flow direction |
| 6. Circle | (f) Connector |
| Column A | Column B |
|---|---|
1. print() | (c) Display output |
2. input() | (a) Read user input |
3. int() | (d) Convert to integer |
4. type() | (b) Check data type |
| 5. IDLE | (e) Python's default IDE |
6. .py | (f) Python file extension |
V. Answer Briefly (2-Mark Questions)
VI. Answer in Detail (5-Mark Questions)
Common Mistakes to Avoid
1. Forgetting to convert input() to a number — input() always returns a string. Use int() or float() for numeric calculations.
2. Confusing flowchart symbols — Oval = Start/End (not process), Rectangle = Process (not I/O), Parallelogram = I/O (not decision), Diamond = Decision (not process).
3. Writing infinite algorithms — Every algorithm must have a clear stopping condition. If-else branches must always lead toward termination.
4. Missing the Start/Stop in flowcharts — Every flowchart must begin with Start (oval) and end with Stop (oval).
5. Not using proper flow direction in flowcharts — Arrows must clearly show the direction of flow. Decision boxes must have two outgoing arrows (Yes and No).
6. Mixing up algorithm and program — An algorithm is written in plain English steps; a program is written in a programming language like Python.
7. Confusing interactive and script mode — Interactive mode is for quick testing (shows >>> prompt); script mode is for saving and running full programs.
Exam Checklist
Before your exam, make sure you can:
- [ ] Define an algorithm and list its properties (finite, unambiguous, input, output)
- [ ] Write algorithms for common problems (sum, even/odd, largest of three)
- [ ] Draw correct flowcharts using proper symbols
- [ ] Identify and explain all flowchart symbols (oval, parallelogram, rectangle, diamond, arrow, circle)
- [ ] Explain the four steps of problem solving
- [ ] Differentiate between interactive and script mode in Python
- [ ] List and explain the features of Python
- [ ] Write basic Python programs (input, print, arithmetic)
- [ ] Use
input(),int(),float(), andprint()correctly - [ ] Differentiate between algorithm, pseudocode, and flowchart
