Manage Pearl Count

Create a Python function to regulate pearl count in milk tea orders ensuring it's within designated shop limits.

Write a Python function named `calculate_pearls` to calculate the number of pearls to be added to a milk tea order. The function should take into account the customer's preference and the shop's restrictions on minimum and maximum quantities of pearls. ### Parameters - `order` (int): The number of pearls the customer requests. - `lower_limit` (int): The minimum quantity of pearls a shop can provide in a single order. - `upper_limit` (int): The maximum quantity of pearls a shop can provide in a single order. ### Return Value - The function should return an integer indicating the actual quantity of pearls to be added to the order, considering the customer's request and the shop's restrictions. ### Examples ```python # When the customer's request is within the shop's limits calculate_pearls(5, 3, 10) # Returns: 5 # When the customer's request is below the shop's limit calculate_pearls(0, 3, 10) # Returns: 3 # When the customer's request exceeds the shop's limit calculate_pearls(14, 3, 10) # Returns: 10 ```