Types of Errors in Python & Basic Python Terminology
1. Types of Errors in Python
A. Syntax Error
Definition: Mistakes in code structure. Program does not run.
Example: print("Hello"
B. Runtime Error
Definition: Error happens while the program is running.
Example: print("10" + 6) → TypeError
C. Logical (Semantic) Error
Definition: Program runs but output is wrong.
Example: wrong formula for average.
2. Python Definition
Python is a high-level, interpreted, object■oriented programming language used for applications, AI,
data science, automation, and more.
3. Basic Python Terms
• Variable – stores data
• Data Types – int, float, str, bool, list
• Keywords – if, else, for, while, def, class…
• Operators – +, -, *, /, ==, and, or, not
• Function – reusable block of code
• Comment – explanation using #
• Indentation – spaces that define code blocks
• Input/Output – input(), print()