48 Answers
New AnswerYou’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/5/2021 7:08:25 PM
Layth48 Answers
New Answerdef seacrh(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() seacrh(text,word)
text = input() word = input() def search(text,word): if(word in text): return "Word found" else: return "Word not found" print(search(text, word))
def search(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() search(text, word) don't forget the indentation
def seacrh(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() seacrh(text,word)
text = input() word = input() def search(text,word): if(word in text): return "Word found" else: return "Word not found" print(search(text, word))
Please kindly help with this coding problem, every time you enter print the output is an error
It is because you are having two print statements to fix this instead of: print(search(text, word)) try: search(text, word)
def search(text,word): if(word in text): return "Word found" else: return "Word not found" Try it
def serch(text,word): if word in text : print('Word found') else: print('word not found') text =input() word=input() search(text,word)
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. Answer: text = input() word = input() def search(text,word): if word in text : return "Word found" else: return "Word not found" print(search(text, word))
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message