Question: Code in Python using a function Write a program that reads a one-line sentence as input from the user and then displays the following response:
Code in Python using a function

Write a program that reads a one-line sentence as input from the user and then displays the following response: If the sentence ends with a question mark (?) and the input contains an even number of characters, display the word Yes. If the sentence ends with a question mark(?) and the input contains an odd number of characters, display the word No. If the sentence ends with an exclamation point (1), display the word Wow. In all other cases, display the words You always say followed by the input string enclosed in quotes. You must implement the function evenCharacters (myString). It will return True if the number of characters in myString is even and False otherwise. This function is defined outside the "if name equals main" block
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
