Trouble with Search engine project | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Trouble with Search engine project

I'm having issues with the code. Test cases given match the output but still gives me wrong answers. Can anyone help? text = input() word = input() def search(x, y): print(search (word, text)) if (word in text): print("word found") else: print("word not found")

9th Apr 2022, 1:54 AM
LAF
4 Answers
+ 4
I mentioned about output variable not input. "Word not found"
9th Apr 2022, 2:43 AM
Simba
Simba - avatar
+ 3
W should be uppercase in "Word...". Better you take a look at the function lessons once.
9th Apr 2022, 2:29 AM
Simba
Simba - avatar
0
The inputs were preassigned and both have lowercase so that is not the problem
9th Apr 2022, 2:39 AM
LAF
0
text = input() word = input() def search(x, y): if word in text: print('Word found') else: print('Word not found') return search(text, word)
25th Jul 2022, 12:13 PM
Danial Ahmad