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
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
+ 1
I did it thanksâ€đ