PYTHON EXAM QUICK NOTES
1. Basics
Python is a high-level programming language. It is easy to read, write, and understand. Python uses indentation
instead of brackets.
2. Variables & Data Types
Variables are used to store data. Common data types are int, float, string, and boolean.
3. Type Casting
Type casting means converting one data type into another using int(), float(), and str().
4. Operators
Operators are used to perform operations. Arithmetic, comparison, and logical operators are commonly used.
5. Input & Output
input() is used to take input from the user and print() is used to display output.
6. Conditional Statements
if, elif, and else statements are used for decision making in Python.
7. Loops
Loops repeat code multiple times. Python supports for loop and while loop.
8. Data Structures
List stores multiple items and is changeable. Tuple is fixed. Set stores unique values. Dictionary stores key-value
pairs.
9. Strings
Strings are used to store text data. Strings are immutable in Python.
10. Functions
Functions are reusable blocks of code created using the def keyword.
11. Recursion
Recursion is a process where a function calls itself.
12. Modules
Modules help reuse code. They are imported using the import keyword.
13. Exception Handling
try and except blocks are used to handle errors and prevent program crashes.
14. File Handling
Files can be opened, read, written, and closed using file handling functions.
15. Object Oriented Programming
OOP uses classes and objects to organize programs.
16. Inheritance
Inheritance allows one class to use properties and methods of another class.
17. Polymorphism
Polymorphism means same function name with different behavior.
18. Built-in Functions
Python provides built-in functions like len(), type(), max(), and min().
19. List Comprehension
List comprehension is a short and simple way to create lists.
20. Lambda Function
Lambda is a small one-line anonymous function.
21. Keywords
Keywords are reserved words like if, else, for, while, and def.
22. Indentation
Indentation is very important in Python because it defines code blocks.
23. Comments
Comments are used to explain code. Single-line comments start with #.
24. Features of Python
Python is easy to learn, portable, open-source, and supports many libraries.
EXAM WRITING TIPS
1. Start with a simple definition.
2. Write syntax if needed.
3. Add a small example.
4. Mention important points clearly.