Python Answers
Python Answers
Unit-2
def increment(x):
return x + 1
h = compose(double, increment)
print(h(3)) # Output: 8
```
UNIT-3
5. **What is list**:
A list is a mutable, ordered collection of elements in Python. Elements can be of different
types and are accessed via indexing. Example: `my_list = [1, "hello", 3.14]`.
7. **Define dictionary**:
A dictionary is an unordered collection of key-value pairs. Keys must be unique and
immutable, while values can be of any type. Example: `my_dict = {"name": "Alice", "age": 25}`.
UNIT-4
UNIT-5
5. **What is pandas**:
Pandas is an open-source data manipulation and analysis library for Python. It provides data
structures and functions needed to manipulate structured data seamlessly, making data analysis
and manipulation tasks easier.