PYTHON
PYTHON
```python
print("Hello, World!")
```
- **Comments**: Use `#` for single-line comments, and triple quotes `""" """` for multi-line comments.
```python
"""
This is a
multi-line comment
"""
```
```python
name = "Alice"
age = 25
```
```python
number = 10 # int
```
```python
print("Adult")
else:
print("Minor")
```
```python
print(i)
age += 1
print(age)
```
### 4. **Functions**
```python
def greet(name):
print(f"Hello, {name}!")
```
```python
```
```python
```
```
```python
unique_numbers = {1, 2, 3, 4}
```
```python
class Dog:
self.name = name
self.breed = breed
def bark(self):
dog1.bark()
```
- **Objects** are instances of classes. They hold data (attributes) and behavior (methods).
### 7. **File Handling**
```python
file.write("Hello, Python!")
```
```python
try:
x = 10 / 0
except ZeroDivisionError:
```
```python
import math
```
```python
```
---