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

8th Mar 2021, 11:05 PM
roby
roby - avatar
8 Antworten
+ 1
Delete "print", and save "search(text, word)"
8th Mar 2021, 11:38 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Oh! Thanks :D it was easy
8th Mar 2021, 11:44 PM
roby
roby - avatar
0
Hi! Can we see your code? Please
8th Mar 2021, 11:26 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Yes, sure
8th Mar 2021, 11:32 PM
roby
roby - avatar
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))
8th Mar 2021, 11:32 PM
roby
roby - avatar
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"
8th Mar 2021, 11:47 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Thank you very much, I didn't know this site. I'll search there next time
8th Mar 2021, 11:53 PM
roby
roby - avatar
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 👍😃
9th Mar 2021, 9:18 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar