Write a function is_even_or_divisible_by_5 that takes an integer as input and return True if it is even or is divisible by 5 else 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.
is_even_or_divisible_by_5(8) -> True (8 is even number)
is_even_or_divisible_by_5(10) -> True (10 is even number and divisible by 5)
is_even_or_divisible_by_5(15) -> True (15 is divisible by 5)
is_even_or_divisible_by_5(7) -> False (not an even number nor divisible by 5)
Implement this function:
def is_even_or_divisible_by_5(num: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: num.
Input
8
Output
True
Write a function is_even_or_divisible_by_5 that takes an integer as input and return True if it is even or is divisible by 5 else 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_even_or_divisible_by_5(8) -> True (8 is even number) is_even_or_divisible_by_5(10) -> True (10 is even number and divisible by 5) is_even_or_divisible_by_5(15) -> True (15 is divisible by 5) is_even_or_divisible_by_5(7) -> False (not an even number nor divisible by 5) ``` ## Your task Implement this function: ```python def is_even_or_divisible_by_5(num: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: `num`. ## Example **Input** ``` 8 ``` **Output** ``` True ``` Write a function deinterleave that takes a string s as input and returns a new string where the characters at even indices are placed before the characters at odd indices. 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. ### Examples ``` "abcdef" -> "acebdf" "12345" -> "13524" ``` ## Your task Implement this function: ```python def deinterleave(s: str) -> str: ``` 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: `s`. ## Example **Input** ``` 'abcdef' ``` **Output** ``` 'acebdf' ``` Write a function make_dict_from_elems_in_index that returns a dictionary consisting of a single key-value pair formed as follows: the key is the element at the given index from the list keys. the value is the element at the given index from the list values . Assume the index is always within valid bounds for both lists. 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 ``` >>> keys = ['apple', 'banana', 'cherry'] >>> values = [10, 20, 30, 40] >>> make_dict_from_elems_in_index(keys, values, 1) {'banana': 20} >>> make_dict_from_elems_in_index(keys, values, -1) {'cherry': 40} ``` ### Explanation Elements of keys, values at index 1 are banana, 20 respectively. Hence the dictionary is {'banana': 20} Elements of keys, values at index -1 are cherry, 40 respectively. Hence the dictionary is {'cherry': 40} ## Your task Implement this function: ```python def make_dict_from_elems_in_index(keys, values, index:int)-> dict: ``` 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: `keys`, `values`, `index`. ## Example **Input** ``` ['apple', 'banana', 'cherry'] [10, 20, 30, 40] 1 ``` **Output** ``` {'banana': 20} ```