+ 1

You’re working on a search engine

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 f the word is present in the text, or "Word not found", if it’s not.

29th Aug 2022, 12:41 PM
Ebube Okpala
Ebube Okpala - avatar
7 Respostas
+ 7
There is no given code. Please put the relevant programming language in the tags. Please clarify what your question is.
29th Aug 2022, 12:43 PM
Lisa
Lisa - avatar
+ 4
The task description mentions a ***given code***. We cannot see this given code and we cannot see what you have tried. Please show your code attempt so we can check on it.
29th Aug 2022, 1:42 PM
Lisa
Lisa - avatar
+ 3
remove "is" from your code
29th Aug 2022, 5:05 PM
MATOVU CALEB
MATOVU CALEB - avatar
+ 2
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. This is the full question It's in python
29th Aug 2022, 1:23 PM
Ebube Okpala
Ebube Okpala - avatar
+ 1
''' Ebube Okpala you don't need the 'is' keyword if word is in text: should be if word in text: ''' def search(text, word): if word in text: return "Word found" else: return "Word not found" text = input() word = input() print(search(text, word))
30th Aug 2022, 10:43 PM
Bob_Li
Bob_Li - avatar
0
def search(text, word): if word is in text: return "Word found" else: return "Word not found" text = input() word = input() print(search(text, word))
29th Aug 2022, 3:25 PM
Ebube Okpala
Ebube Okpala - avatar
0
Thank you
31st Aug 2022, 8:44 AM
Ebube Okpala
Ebube Okpala - avatar