Question: use python One thing we might want to know, given an input to a chatbot, is if the input is a question. We are going
One thing we might want to know, given an input to a chatbot, is if the input is a question. We are going to use a very simple heuristic to check this: we will consider any input that has a question mark ('?') in it to be a questice To do so, write a function called is_question. This function should have the following inputs, outputs, and internal procedures: Input(s): input_string - string . Output(s): . output - boolean Procedure(s): . if there is a ? in input_string, set output to True otherwise, set output to False . return output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
