0

How Can i solve this?

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

17th Jan 2022, 9:20 AM
Sajjad
Sajjad - avatar
2 Answers
+ 2
Sajjad Create a variable which will contain your first string input(), which is the text sentence - txt Then create a variable which will contain the input which is the word you are searching for - wrd Now you can create an if/else bit of code. If wrd in txt: print(something) else: print(something else) See if you can put it all together. Good luck
17th Jan 2022, 9:30 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
I did it thanksâ€đŸ™
17th Jan 2022, 9:34 AM
Sajjad
Sajjad - avatar