Question: Write a Python function to that will return 'hello' if the word 'good' is in the sentence and will return 'goodbye' if the word 'bad'
Write a Python function to that will return 'hello' if the word 'good' is in the sentence and will return 'goodbye' if the word 'bad' is in the sentence. If neither 'good' or 'bad' is in the string, return 'hello and goodbye'. If both 'good' and 'bad' are in the sentence return 'I am confused'.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
