Write a function compute_electricity_bill(units) that returns the bill for units units of electricity. The whole consumption is charged at the rate of the slab it falls in:
The bill you return is compared after rounding it to 4 decimal places.
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.
compute_electricity_bill(200) -> 100
compute_electricity_bill(412) -> 670.8
Implement this function:
def compute_electricity_bill(units: int) -> float:
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: units.
Input
200
Output
100
Write a function `compute_electricity_bill(units)` that returns the bill for `units` units of electricity. The whole consumption is charged at the rate of the slab it falls in: - up to 200 units: 0.50 per unit. - 201 to 400 units: 0.75 per unit, plus a fixed charge of 150. - more than 400 units: 0.90 per unit, plus a fixed charge of 300. The bill you return is compared after rounding it to 4 decimal places. 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 ``` compute_electricity_bill(200) -> 100 compute_electricity_bill(412) -> 670.8 ``` ## Your task Implement this function: ```python def compute_electricity_bill(units: int) -> float: ``` 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: `units`. ## Example **Input** ``` 200 ``` **Output** ``` 100 ``` Write a function `is_reverse_combined_palindrome(s1, s2)` that reverses the string `s1`, joins `s2` to the end of it, and returns `True` if the resulting string is a palindrome (it reads the same forwards and backwards). Otherwise it returns `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_reverse_combined_palindrome("mad", "am") -> False is_reverse_combined_palindrome("dam", "am") -> True ``` ## Your task Implement this function: ```python def is_reverse_combined_palindrome(s1: str, s2: 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: `s1`, `s2`. ## Example **Input** ``` "mad" "am" ``` **Output** ``` False ``` Write a function `is_pangram(text)` that returns `True` if every letter of the English alphabet, from `a` to `z`, appears at least once in `text`, without regard to upper or lower case. Other characters in `text` are ignored. Otherwise it returns `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_pangram("the quick brown fox jumps over the lazy dog") -> True is_pangram("this is not a pangram") -> False ``` ## Your task Implement this function: ```python def is_pangram(text: 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: `text`. ## Example **Input** ``` "the quick brown fox jumps over the lazy dog" ``` **Output** ``` True ```