SLOW LEARNER SPECIAL NOTES
Problem Solving Using Python (BCE-CSC01)
UNIT 1 – BASICS OF PYTHON
• Computer solves problems step-by-step.
• Algorithm = simple steps to solve a problem.
• Flowchart = picture of steps.
• Python is easy, simple, and beginner-friendly.
• Variable = name to store data.
• Data types: int, float, string.
• Expression = calculation part.
UNIT 2 – CONTROL STATEMENTS
• if = to check a condition.
• if-else = two options.
• elif = many conditions.
• Loop = repeat same work.
• while loop = repeats until condition becomes false.
• for loop = repeats fixed number of times.
UNIT 3 – FUNCTIONS
• Function = block of code to reuse.
• Use ‘def’ to create a function.
• return = gives output from a function.
• Arguments = data you send to function.
• Default argument = value already fixed.
UNIT 4 – OBJECTS & FILES
• Object = real-world item in program.
• Class = model to create objects.
• Module = file that has Python code.
• File handling: open, read, write, close.
• Exception = error at runtime.
UNIT 5 – DICTIONARIES, SETS, OOP, RECURSION
• Dictionary = data in key:value pairs.
• Set = unique items.
• OOP = class + object + inheritance + polymorphism.
• Recursion = function calling itself.