Question: Write a Python module called simplematch.py that contains a recursive function called match ( pattern , word ) , that can be used to determine

Write a Python module called simplematch.py that contains a recursive function called
match(pattern, word), that can be used to determine if a given pattern matches a given word.
A pattern consists of letters and ? wildcards.
A ? wildcard matches any letter at the corresponding position in the word.
On the Amathuba page for this assignment you will find a program called testsimple.py that you can
use to check your function. (The automatic marker will use this.)
Sample IO (The input from the user is shown in bold font do not program this):
Enter a pattern (or 'q' to quit):
l?ad
Enter a word
lead
It's a match.
Enter a pattern:
le?d
Enter a word
led
They don't match.
Enter a pattern (or 'q' to quit):
l??d
Enter a word
lend
It's a match.
Enter a pattern (or 'q' to quit)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!