A sweet shop packs laddus into boxes. Every box holds exactly box_size laddus, and a box is sold only when it is full. Write a function boxes_and_leftover(laddus, box_size) that returns a tuple of two integers: the number of full boxes, and the number of laddus left over after the full boxes are packed. laddus is 0 or more and box_size is 1 or more.
NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition.
boxes_and_leftover(47, 6) -> (7, 5)
boxes_and_leftover(30, 5) -> (6, 0)
Implement this function:
def boxes_and_leftover(laddus: int, box_size: int) -> tuple:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: laddus, box_size.
Input
47
6
Output
(7, 5)

A sweet shop packs laddus into boxes. Every box holds exactly `box_size` laddus, and a box is sold only when it is full. Write a function `boxes_and_leftover(laddus, box_size)` that returns a tuple of two integers: the number of full boxes, and the number of laddus left over after the full boxes are packed. `laddus` is 0 or more and `box_size` is 1 or more. NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition. ### Example ``` boxes_and_leftover(47, 6) -> (7, 5) boxes_and_leftover(30, 5) -> (6, 0) ``` ## Your task Implement this function: ```python def boxes_and_leftover(laddus: int, box_size: int) -> tuple: ``` Write the function only — the arguments are read for you and the return value is printed automatically. **Arguments** arrive as one Python literal per line, in this order: `laddus`, `box_size`. ## Example **Input** ``` 47 6 ``` **Output** ``` (7, 5) ``` Write a function `sum_last_two_digits(n)` that returns the sum of the ones digit and the tens digit of `n`. `n` is 0 or more. If `n` has only one digit, its tens digit is taken as 0, so the answer is `n` itself. NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition. ### Example ``` sum_last_two_digits(472) -> 9 sum_last_two_digits(5) -> 5 ``` ## Your task Implement this function: ```python def sum_last_two_digits(n: int) -> int: ``` Write the function only — the arguments are read for you and the return value is printed automatically. **Arguments** arrive as one Python literal per line, in this order: `n`. ## Example **Input** ``` 472 ``` **Output** ``` 9 ``` Write a function `divisible_by_both(n, a, b)` that returns `True` if `n` is divisible by `a` and also divisible by `b`, and `False` otherwise. A number is divisible by `a` when dividing it by `a` leaves the remainder 0. `a` and `b` are 1 or more. `n` can be any integer: it can be 0 (0 is divisible by every number) and it can be negative. NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition. ### Example ``` divisible_by_both(12, 2, 3) -> True divisible_by_both(20, 4, 6) -> False ``` ## Your task Implement this function: ```python def divisible_by_both(n: int, a: int, b: int) -> bool: ``` Write the function only — the arguments are read for you and the return value is printed automatically. **Arguments** arrive as one Python literal per line, in this order: `n`, `a`, `b`. ## Example **Input** ``` 12 2 3 ``` **Output** ``` True ```