Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
In the exercise "Search Engine", how do you write the code?
The output is correct, but the code generate another output ("None") besides those requested
8 ответов
+ 1
Delete "print", and save "search(text, word)"
+ 1
Oh! Thanks :D it was easy
0
Hi! Can we see your code? Please
0
Yes, sure
0
text = input()
word = input()
def search(text,word):
if word in text:
return print("Word found")
else:
return print("Word not found")
print(search(text, word))
0
I recently encountered such a problem and found a hint on the Internet. on the stackoverflow, the search was done for the phrase " no output"
0
Thank you very much, I didn't know this site. I'll search there next time
0
Try this:
Roberta Serra
def seacrh(text,word) :
if word in text :
print ('Word found')
else:
print('Word not found')
text = input()
word = input()
seacrh(text,word)
Happy coding 👍😃