+ 1

Search engine problem

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

11th Aug 2021, 3:05 PM
Ermias Kebede
Ermias Kebede - avatar
5 Respuestas
+ 2
It'll do what you want, but it wont pass and it'll also print out 'None'
11th Aug 2021, 3:10 PM
Slick
Slick - avatar
+ 1
search() doesn't return anything, so change to: search(text, word) *And output checking is case sensitive
11th Aug 2021, 3:08 PM
Slick
Slick - avatar
+ 1
You forgot to indent the lines inside of the function(or it's just a formatting problem when you copied it into the question).
11th Aug 2021, 3:12 PM
Chloe
Chloe - avatar
0
Is the code right ?
11th Aug 2021, 3:09 PM
Ermias Kebede
Ermias Kebede - avatar
0
Ermias Bibi 3 problem: 1 - w is in caps it's 'Word' 2 - Indentation problem 3 - You have printed result in function and your function is not returning anything so don't print function otherwise you will get 'None' so just call function.
11th Aug 2021, 3:24 PM
A͢J
A͢J - avatar