A class of English words is called mysterious if it satisfies certain
conditions. Those conditions are hidden from you. Instead, a function named
mysterious is already defined for you in the starter code: it accepts a word as
argument and returns True if the word is mysterious and False otherwise. Call
it, but do not depend on how it decides.
Write a function named type_of_sequence that accepts a list of words as
argument. Its return value is a string that depends on the number of mysterious
words in the sequence. If k denotes the number of mysterious words in the
sequence, then:
k | Return value |
|---|---|
| less than 2 | 'mildly mysterious' |
| at least 2 but less than 5 | 'moderately mysterious' |
| 5 or more | 'most mysterious' |
You do not have to accept input from the user or print anything to the console.
You just have to write the definition of type_of_sequence.
Implement this function:
def mysterious(word):
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: words.
Input
['cat', 'bird', 'ox']
Output
'mildly mysterious'