Answer:
Following are the code to this question:
def is_question(input_string): # defining method is_question
output = '?' in input_string # checking question mark symbol in value
return output #return value
input_string = input('Enter any string value: ') # defining variable input_string to input value
print (is_question(input_string)) # call method and print return value
Output:
Enter any string value: what is your name?
True
Step-by-step explanation:
In the given python program code, a method "is_question" is declared, which accepts an "input_string" value in its parameter.
- Inside the method, an output variable is used, that search question symbol in the parameter value and return its value.
- In the next step, the input_string variable is declared, which uses the input method to accepts string value and passes into method calling time and print its return value.