I am stuck on the search engine project at the end of Python for beginners. Can anyone help me by explaining it? Thanks
MajesticPlatypus Other form: text = input() word = input() def search(a, b): if b in a: return "Word found" else: return "Word not found" print(search(text, word)) 😁😁
post all the information of it here
Thanks! I did it!
text = input() word = input() def search(): if word in text: print('Word found') else: print('Word not found') search()
You’re working on a search engine. Watch your back Google! The given code takes a text and a word as input and passes them to a function called search(). The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not. Sample Input "This is awesome" "awesome" Sample Output Word found
Use the 'in' operator. As in: if <blah> in <blah>: do stuff MajesticPlatypus Nice!
Class and instance attributes
How does this works?
Button after Button
FYP PROJECT IDEAS