Write a function is_even_and_second_last_digit_is_two that takes an integer input num and returns a boolean value. The function should check if the number is even and if the second last digit is two. If both conditions are satisfied, return True; otherwise, return False.
>>> is_even_and_second_last_digit_is_two(232)
False
>>> is_even_and_second_last_digit_is_two(120)
True
>>> is_even_and_second_last_digit_is_two(25)
False
>>> is_even_and_second_last_digit_is_two(13)
False
Implement this function:
def is_even_and_second_last_digit_is_two(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
232
Output
False
Write a function is_even_and_second_last_digit_is_two that takes an integer input num and returns a boolean value. The function should check if the number is even and if the second last digit is two. If both conditions are satisfied, return True; otherwise, return False. ### Examples ``` >>> is_even_and_second_last_digit_is_two(232) False >>> is_even_and_second_last_digit_is_two(120) True >>> is_even_and_second_last_digit_is_two(25) False >>> is_even_and_second_last_digit_is_two(13) False ``` ## Your task Implement this function: ```python def is_even_and_second_last_digit_is_two(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** ``` 232 ``` **Output** ``` False ``` You are given a string s and an integer n. Your task is to capitalize the nth character in the string s, If n is greater than the length of the string, return the string unchanged. ### Examples ``` >>> upper_nth_index_char("hello", 1) 'hEllo' >>> upper_nth_index_char("python", 3) 'pytHon' >>> upper_nth_index_char("python", 9) 'python' ``` ## Your task Implement this function: ```python def upper_nth_index_char(s: str, n: int) -> 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`, `n`. ## Example **Input** ``` "hello" 1 ``` **Output** ``` 'hEllo' ``` Given two lists list1 and list2, merge both lists and return a set with all the elements in the list1 and list2. ### Examples ``` >>> merge_and_remove_duplicates([1, 2, 2], [2, 1, 1]) {1, 2, 1} >>> merge_and_remove_duplicates(["ant", "bat"], ["bat", "cat"]) {'ant', 'bat', 'cat'} ``` ## Your task Implement this function: ```python def merge_and_remove_duplicates(list1: list, list2: list) -> set: ``` 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: `list1`, `list2`. ## Example **Input** ``` [1, 2, 2] [2, 1, 1] ``` **Output** ``` {1, 2} ```