In the last project in python for beginners. I don't understand | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In the last project in python for beginners. I don't understand

23rd Jul 2022, 9:53 PM
Mmadugafor Izuchukwu Stanley
Mmadugafor Izuchukwu Stanley - avatar
3 Answers
+ 3
Corrected code: text = input() word = input() def search(text , y): if word in text: return("Word found") else: return("Word not found") print(search(text, word)) There is no need of splitting given text and you are giving splitted text to function to search in `text` which doesn't makes any sense.
24th Jul 2022, 5:36 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
Last project in python for beginers is build search engine using functions. What exacly you dont understand here? Please post your code attempt so we can see where you make mistake and help you.
23rd Jul 2022, 10:16 PM
PanicS
PanicS - avatar
+ 1
text = input() word = input() y = text.split(",") def search(text , y): if y in text: return("Word found") else: return("Word not found") print(search(text, y))
23rd Jul 2022, 10:17 PM
Mmadugafor Izuchukwu Stanley
Mmadugafor Izuchukwu Stanley - avatar