Question: Write a function called friendly ( greeting ) that takes a string named greeting as input. If the greeting begins with the words 'Hello' or
Write a function called friendlygreeting that takes a string named greeting as input. If the greeting begins with the words 'Hello' or Hi the function returns some friendly greeting string of your choice. Otherwise, if the greeting string ends with a question mark, the function returns the string 'Good question! Otherwise, the function returns with some string indicating that it didn't understand the greeting eg 'I am sorry, but I did not understand you.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
