Computer Science Class 11 - Chapter 3 Notes
Flowchart Symbols
- Start/End: Oval shape
- Flow: Arrows show direction
- Process: Rectangle (for calculation)
- Input/Output: Parallelogram
- Decision: Diamond (if/else)
- Connector: Small circle
Steps to Create Flowchart
1. Know the purpose
2. Start with template
3. Add shapes & symbols
4. Connect using arrows
5. Add decisions
6. Customize appearance
7. Download/share
Pseudocode
- English-like code
- Not real programming code
- No strict rules
- Helps in planning
Example: Phone call steps
1. Unlock phone
Computer Science Class 11 - Chapter 3 Notes
2. Open contacts
3. Search & Call
4. End call
Python Intro
- High-level, open-source
- Made by Guido van Rossum (1991)
- Easy, simple, flexible
- Based on ABC language
- Named after 'Monty Python'
Advantages of Python
1. Platform-independent
2. Readable & simple
3. Object-oriented
4. Productive
5. Fast learning
6. GUI programming
7. Big library support
8. Syntax highlighting
Limitations of Python
1. Slower than C/C++
2. Not good for mobile apps
Computer Science Class 11 - Chapter 3 Notes
3. High memory usage
4. Weak DB access
5. Runtime errors (dynamically typed)
Installing Python
- Download from python.org
- Version: 3.6.5 used
- Install and use IDLE (Python Shell + Editor)
Using Python Shell
- Python Shell = interactive mode
- Use >>> prompt
- Type commands directly
First Program
- print('Hello World')
- Python is case-sensitive
- Print != print
Math in Python
- Use print for math too
- Example: print(5 + 8)
- Arguments in print() are comma-separated
Computer Science Class 11 - Chapter 3 Notes
Features of Python
- Easy, expressive, portable
- Interpreted, object-oriented
- Extensible
- GUI & library support
Pseudocode Example
Set total = 0
Repeat 10 times:
Get marks, add to total
Average = total / 10
Display average
Name Input Example
Pseudocode:
input username
output Hello username
Python:
name = input(...)
print(...)
Decomposition
- Break problem into small parts
- Solve parts individually
Computer Science Class 11 - Chapter 3 Notes
- Easier to solve big problems
Starting Python
- Go to Start > Apps > IDLE (Python 3.6.5 32-bit)
- Starts in shell mode
- Type & run code easily