+ 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.
8 odpowiedzi
+ 7
There is no given code.
Please put the relevant programming language in the tags.
Please clarify what your question is.
+ 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.
+ 3
remove "is" from your code
+ 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
+ 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))
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))
0
Thank you