Write a function is_both_divisible_by(a, b, c) that returns True if both a and b are divisible by c, and False otherwise. c is never zero.
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.
is_both_divisible_by(10, 15, 5) -> True
is_both_divisible_by(10, 13, 5) -> False
Implement this function:
def is_both_divisible_by(a: int, b: int, c: 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: a, b, c.
Input
10
15
5
Output
True
Write a function `is_both_divisible_by(a, b, c)` that returns `True` if both `a` and `b` are divisible by `c`, and `False` otherwise. `c` is never zero. 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 ``` is_both_divisible_by(10, 15, 5) -> True is_both_divisible_by(10, 13, 5) -> False ``` ## Your task Implement this function: ```python def is_both_divisible_by(a: int, b: int, c: 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: `a`, `b`, `c`. ## Example **Input** ``` 10 15 5 ``` **Output** ``` True ``` Write a function `is_rotation(str1, str2)` that returns `True` if `str2` can be obtained by rotating `str1`, that is, by moving some characters from the front of `str1` to its end without changing their order. A string is also a rotation of itself. Otherwise return `False`. 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 ``` is_rotation("abcde", "cdeab") -> True is_rotation("hello", "ehllo") -> False ``` ## Your task Implement this function: ```python def is_rotation(str1: str, str2: str) -> 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: `str1`, `str2`. ## Example **Input** ``` "abcde" "cdeab" ``` **Output** ``` True ``` The list `nums` was meant to hold every integer from `1` to `n`, but one of them is missing. Some of the other numbers may appear more than once. Write a function `find_missing_number(nums, n)` that returns the number from `1` to `n` that is not in the list. 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 ``` find_missing_number([1, 4, 2, 4, 6, 5, 6], 6) -> 3 find_missing_number([2, 3, 4, 5], 5) -> 1 ``` ## Your task Implement this function: ```python def find_missing_number(nums: list, 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: `nums`, `n`. ## Example **Input** ``` [1, 4, 2, 4, 6, 5, 6] 6 ``` **Output** ``` 3 ```