Search engine project in python for beginners course | Sololearn: Learn to code for FREE!

+2

Search engine project in python for beginners course

text = input() word = input() def search(text, word ): if word in text: print("Word found") else: print("Word not found") print(search(text, word)) #All test caises fail because it outputs None added to the correct output. Plz. Help.

2/17/2021 11:05:56 AM

Mohamed Mehdi Gara

31 Answers

New Answer

+6

With 'print' inside a function, you don't need the outside one .It prints 'none' because the function do not return a value. So, you have to remove the last print statement to avoid it. search(text,word)

+6

def seacrh(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() seacrh(text,word) This will work 100%.👍

+6

text = input() word = input() def search(text, word): if word in text: print('Word found') else: print("Word not found") search(text, word) Try this

+5

+4

+4

Tell did it works or not

+4

Mohamed Mehdi Gara But she need answer for her code

+4

How is it possible

+4

+4

Try this: text = input() word = input() def search(text, word): #for i in word: if word in text: a ="Word found" return a else: b = "Word not found" return b print(search(text, word))

+3

Welcome Tell did it works or not

+3

+2

def seacrh(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() seacrh(text,word) This will work 100%.👍

+2

text = input() word = input() def search(text, word ): if word in text: print("Word found") else: print("Word not found") print(search(text, word)) please help us by this code error

+2

who can tell me the last answer of this project because it is difficult

+2

Kierren Haggerty your welcome 😃

+1

1. sentence=input("Enter a sentence:") 2. particular_word=input("Enter a particular word:") 3. def findin_word(sentence,particular_word): 4. if(particular_word in sentence): 5. return(particular_word + " is found in " +sentence) 6. else: 7. return("not found") 8. print(findin_word(sentence,particular_word)) It's only for knowledge.it will not work on sololearn project

+1

project name is search engene

+1

Thanks a lot :). But I already got the answer.

+1

it is not working 🙄