Exceptions and Comparisons

Report a typo

Create a function check_w_letter(word) that checks if the given word contains the "w" letter. If it does, raise an error called WordError that you should define yourself. If not, return the word.

Tip: You do not have to handle the exception using the try-except block; just raise it.

Write a program in Python 3
def check_w_letter(word):
...
___

Create a free account to access the full topic