A student passes a test with 40 marks or more. Write a function pass_or_fail(marks) that returns the string "Pass" if marks is 40 or more, and the string "Fail" otherwise. marks is an integer from 0 to 100. Use the same capital letters as shown.
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.
pass_or_fail(75) -> 'Pass'
pass_or_fail(39) -> 'Fail'
Implement this function:
def pass_or_fail(marks: 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: marks.
Input
75
Output
'Pass'

A student passes a test with 40 marks or more. Write a function `pass_or_fail(marks)` that returns the string "Pass" if `marks` is 40 or more, and the string "Fail" otherwise. `marks` is an integer from 0 to 100. Use the same capital letters as shown. 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 ``` pass_or_fail(75) -> 'Pass' pass_or_fail(39) -> 'Fail' ``` ## Your task Implement this function: ```python def pass_or_fail(marks: 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: `marks`. ## Example **Input** ``` 75 ``` **Output** ``` 'Pass' ``` A city bus decides the ticket price, in rupees, from the age of the passenger: - age below 5: the ticket is free, so the price is 0 - age from 5 to 12 (both included): 50 - age from 13 to 59 (both included): 100 - age 60 or more: 60 Write a function `ticket_price(age)` that returns the price. `age` is an integer, 0 or more. 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 ``` ticket_price(8) -> 50 ticket_price(30) -> 100 ``` ## Your task Implement this function: ```python def ticket_price(age: 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: `age`. ## Example **Input** ``` 8 ``` **Output** ``` 50 ``` A child is allowed on a fair ride only when both of these rules are satisfied: - the height of the child is 120 cm or more - the child is 10 years old or more, or the child comes with an adult Write a function `can_ride(height, age, with_adult)` that returns `True` if the child is allowed on the ride and `False` otherwise. `height` (in cm) and `age` (in years) are positive integers. `with_adult` is `True` if the child comes with an adult and `False` if not. 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 ``` can_ride(130, 12, False) -> True can_ride(130, 8, False) -> False ``` ## Your task Implement this function: ```python def can_ride(height: int, age: int, with_adult: bool) -> 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: `height`, `age`, `with_adult`. ## Example **Input** ``` 130 12 False ``` **Output** ``` True ```