9 Respuestas
+ 1
You're missing return statement in if-else statements.
+ 1
Thank you. Now I see the problem
+ 1
If you are facing problems in writing the code.
I recommend you to see the following solution for it🙂
def seacrh(text,word) :
if word in text :
print ('Word found')
else:
print('Word not found')
text = input()
word = input()
seacrh(text,word)
+ 1
# Search Engine written by Klaudya
text = input()
word = input()
if word in text:
print ("Word found")
else:
print ("Word not found")
0
What is 42?
0
Only after you post your try
0
Hi NEZ,
I tried it like this but I don't know the problem.
text = input()
word = input()
def search(text, word):
if word in text:
"Word found"
else:
"Word not found"
print(search(text, word))
0
Do not print the function, print in the function then call the function :
text = input()
word = input ()
def search(text,word):
if word in text:
print("Word found")
else:
print("Word not found")
search(text,word)