Python_Programming_Short_Notes
Python_Programming_Short_Notes
1. Introduction to Python:
Python is a high-level, interpreted programming language. It is known for its simplicity and readability.
print("Hello, World!")
Variables store data. Constants are defined using uppercase variable names by convention.
5. Operators in Python:
- Arithmetic: +, -, *, /, %, **, //
6. Conditional Statements:
7. Loops in Python:
- while loop
8. Functions in Python:
Example:
C Programming - Short Notes
return a + b
9. Data Structures:
- List: [1, 2, 3]
- Tuple: (1, 2, 3)
- Set: {1, 2, 3}
- Inheritance
- Encapsulation
- Polymorphism
Example:
class Student:
self.name = name
def display(self):
print("Name:", self.name)
Example:
data = file.read()
C Programming - Short Notes