Buscador en python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Buscador en python

El output es correcto pero cuando pasa a los casos ninguno sale en verde pero las salidas estan bien que mas hace falta? text = input() word = input() def search(text,word): if word in text: a="word found" return a else: b="word not foud" return b print(search(text,word))

29th Sep 2021, 10:24 PM
alejandro rubio penagos
alejandro rubio penagos - avatar
3 Answers
+ 2
Su salida debe comenzar con una letra mayúscula. Igual que: "Word found" Esto funcionará: def search (text, word): if word in text: print("Word found") else: print("Word not found") text = input() word = input() search(text, word)
29th Sep 2021, 11:42 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
Thanks this correct
30th Sep 2021, 12:36 AM
alejandro rubio penagos
alejandro rubio penagos - avatar
+ 1
No problem bro 👍
30th Sep 2021, 12:37 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar