0
def search (text, found): if word in text: print("word found") else: print("word not found") Guy
I solved this problem why is not working python search ingine but does'n work help guys please
6 Respuestas
+ 5
There will be needed word as second parameter of the function instead found.
+ 2
What's the second parameter for?
+ 2
def search (text, word):
if word in text:
print("word found")
else:
print("word not found")
Simple mistake, you changed the name found in word.
Some testing
search("hello how are you?", "you")
search("hello how are you?", "bye")
+ 1
What is the second parameter??
0
https://code.sololearn.com/cYkI26FaU3Wi/?ref=app
See this
If any problem in understanding then message me
Happy Coding!
0
Husni The problem was you didn't made strings in search variable
that will say for numbers
In my code search for "red"
And see how the code was framed
If any problems then message me
Happy Coding!