0
Search engine problem
Youāre working on a search engine. Watch your back Google! The given code takes a text and a word as input and passes them to a function called search(). The search() function should return "Word found" if the word is present in the text, or "Word not found", if itās not. Sample Input "This is awesome" "awesome" Sample Output Word found
4 Answers
+ 5
Aaron ngetich You need to read problem statement and expected output carefully.
Check the expected output and your code you will understand what you missed
return "Word found"
else:
return "Word not found"
print(search(text, word))
+ 3
"word found" must be in capital letter W
+ 2
Seen it R(āæ^āæ^)š»š®š³ , thanks it was a typo.
0
"""
My code so far.
"""
text = input()
word = input()
def search (text, word ):
if word in text:
print("word found")
else:
print("Word not found")
search(text, word)