Write a function starts_and_ends_with_same_vowel that takes a string as input and returns True if the string starts and ends with the same vowel (case insensitive), otherwise False.
NOTE: This is a function type question, you don't have to take input or print the output, just complete the required function definition.
starts_and_ends_with_same_vowel("Apple") → False (starts with A and ends with e, different vowels)
starts_and_ends_with_same_vowel("Atta") → True (starts with A and ends with a, same letter and vowel)
starts_and_ends_with_same_vowel("Tart") → False (starts with T, ends with t, same letter but not vowel)
starts_and_ends_with_same_vowel("umbrella") → False (starts with u, ends with a, different vowels)
Implement this function:
def starts_and_ends_with_same_vowel(s: 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: s.
Input
"Apple"
Output
False
Write a function starts_and_ends_with_same_vowel that takes a string as input and returns True if the string starts and ends with the same vowel (case insensitive), otherwise False. NOTE: This is a function type question, you don't have to take input or print the output, just complete the required function definition. ### Example ``` starts_and_ends_with_same_vowel("Apple") → False (starts with A and ends with e, different vowels) starts_and_ends_with_same_vowel("Atta") → True (starts with A and ends with a, same letter and vowel) starts_and_ends_with_same_vowel("Tart") → False (starts with T, ends with t, same letter but not vowel) starts_and_ends_with_same_vowel("umbrella") → False (starts with u, ends with a, different vowels) ``` ## Your task Implement this function: ```python def starts_and_ends_with_same_vowel(s: 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: `s`. ## Example **Input** ``` "Apple" ``` **Output** ``` False ``` Write a function compare_last_digits(num1, num2) that takes two integers as input and checks whether they have the same last digit. Return "same" if the last digits match, otherwise return "different". 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 ``` compare_last_digits(123, 43) -> "same" # Last digit of both is 3 compare_last_digits(56, 78) -> "different" # Last digits are 6 and 8 compare_last_digits(90, 0) -> "same" # Last digit of both is 0 ``` ## Your task Implement this function: ```python def compare_last_digits(num1:int, num2: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: `num1`, `num2`. ## Example **Input** ``` 123 43 ``` **Output** ``` 'same' ``` Given a tuple t, write a function move_even_indices_to_end_reversed to move all elements at even indices to the end of the tuple in reversed order, while keeping the odd-indexed elements in their original order. 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 ``` >>> t = (10, 20, 30, 40, 50) >>> move_even_indices_to_end_reversed(t) (20, 40, 50, 30, 10) ``` ### Explanation even-indexed elements = (10, 30, 50)\ reversed evens = (50, 30, 10)\ odd-indexed elements = (20, 40)\ Final output = (20, 40, 50, 30, 10) ## Your task Implement this function: ```python def move_even_indices_to_end_reversed(t): ``` 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: `t`. ## Example **Input** ``` (10, 20, 30, 40, 50) ``` **Output** ``` (20, 40, 50, 30, 10) ```