Write a program called magicword.py that asks the user for two magic words, one at a time. The program accepts a two-word phrase only if the first word contains an 'm' and the second contains a 'w'. If the first word they input is wrong, the program immediately stops. If it is correct, they are then prompted for the second word. Python lets you check for substrings within other strings like so:
if 'people' in 'mahpeople':
print('this is true!')
if 'mid' in 'mahpeople':
print('this is not true!')
You'll need to use this in operator to check for letters in your input strings for this HW.
Your program should run exactly as follows:
What's the first magic word? potion
Wrong at the start! Away with you!
What's the first magic word? amazing A good start, my liege. What's the second magic word? brown Well done, you are most wise.
What's the first magic word? surmount A good start, my liege. What's the second magic word? waste Well done, you are most wise.
What's the first magic word? monumental A good start, my liege. What's the second magic word? kittens Wrong! Away with you!
Submit your magicword.py to the online submission system under hw4-ifmagic.
Your output must exactly match the above.
submit -c=sd211 -p=hw4-ifmagic magicword.py