0

Can anyone help me with python?

I have a problem solving the 42. Search engine for python for beginners. Can anyone help me?

2nd Mar 2022, 4:06 PM
Jinx Heniux
9 ответов
+ 1
You're missing return statement in if-else statements.
3rd Mar 2022, 12:45 AM
Simba
Simba - avatar
+ 1
Thank you. Now I see the problem
3rd Mar 2022, 6:34 AM
Jinx Heniux
+ 1
If you are facing problems in writing the code. I recommend you to see the following solution for it🙂 def seacrh(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() seacrh(text,word)
4th Mar 2022, 5:39 AM
Sai Krishna
Sai Krishna - avatar
+ 1
# Search Engine written by Klaudya text = input() word = input() if word in text: print ("Word found") else: print ("Word not found")
4th Mar 2022, 6:22 AM
K1auDIa KaDaM0UR0
K1auDIa KaDaM0UR0 - avatar
0
What is 42?
2nd Mar 2022, 4:11 PM
Spartanguy1031
Spartanguy1031 - avatar
0
Only after you post your try
2nd Mar 2022, 4:21 PM
NEZ
NEZ - avatar
0
Hi NEZ, I tried it like this but I don't know the problem. text = input() word = input() def search(text, word): if word in text: "Word found" else: "Word not found" print(search(text, word))
2nd Mar 2022, 7:04 PM
Jinx Heniux
0
Do not print the function, print in the function then call the function : text = input() word = input () def search(text,word): if word in text: print("Word found") else: print("Word not found") search(text,word)
2nd Mar 2022, 9:55 PM
Benjámin Kiss
Benjámin Kiss - avatar