Click4Ai

244.

Hard

This problem involves creating a function to determine the answer to a question based on a given passage of text. **Example:** Given a passage 'The capital of France is Paris' and a question 'What is the capital of France?', the function should return 'Paris'. **Constraints:** The passage and question will be strings, and the answer should be a string. The function should be able to handle multiple sentences in the passage and questions with multiple possible answers.

Test Cases

Test Case 1
Input: "The capital of France is Paris", "What is the capital of France?"
Expected: "Paris"
Test Case 2
Input: "The sun is a star", "What is the sun?"
Expected: "a star"
+ 3 hidden test cases