Buenos días no hablo mucho inglés necesito ayuda para terminar Python begginers estoy en la lección 45 pero no sé cómo terminar | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Buenos días no hablo mucho inglés necesito ayuda para terminar Python begginers estoy en la lección 45 pero no sé cómo terminar

Estoy resolviendo el motor de búsqueda pero solo puedo resolver el primer ejercicio y no me permite ingresar un código para el resultado 2

30th Sep 2021, 11:17 AM
Sadegh Mejias
19 Answers
+ 5
def search(text,word): if word in text: print("Word found") else: print("Word not found") text = input() word = input() (search(text, word))
30th Sep 2021, 1:36 PM
Matt Webb
+ 4
Saben, es bueno hablar también nuestra lengua nativa, sería bueno hacer una rica comunidad en español aquí.
1st Oct 2021, 10:18 PM
Alvin Asael Amaya Pineda
Alvin Asael Amaya Pineda - avatar
+ 2
Aleksei Radchenkov for me it's easier because it has a small relationship with Portuguese
30th Sep 2021, 11:41 AM
Erlénio.RS
Erlénio.RS - avatar
+ 1
Sadegh Mejias Here's my code, it's the same one I used to complete the code. and it worked: def search(text, word) : if word in text : return "Word found" else: return "Word not found" text = input() word = input() print(search(text, word))
30th Sep 2021, 12:03 PM
Erlénio.RS
Erlénio.RS - avatar
0
envía la pregunta completa
30th Sep 2021, 11:24 AM
Erlénio.RS
Erlénio.RS - avatar
0
Por favor muéstranos tu intento
30th Sep 2021, 11:25 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Erlénio.RS , oh common can't u speak Spanish? 🤣
30th Sep 2021, 11:25 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Aleksei Radchenkov había olvidado
30th Sep 2021, 11:28 AM
Erlénio.RS
Erlénio.RS - avatar
0
def search(text, Word): if(text.find(Word)): print("Word found") else: print("Word not found") text = input() word = input() search(text, word)
30th Sep 2021, 11:29 AM
Sadegh Mejias
0
Ese es mi codigo, pero solo funciona para resultado uno, y al realizar resultado 2, me da todo incorrecto
30th Sep 2021, 11:31 AM
Sadegh Mejias
0
Sadegh Mejias primer uso: word in text: en lugar de find() esto funcionará: text = input() word = input() def search (text, word): if word in text: print("Word found") else: print("Word not found") text = input() word = input()Sadegh Mejias primer uso: word in text: en lugar de find() esto funcionará: text = input() word = input() def search (text, word): if word in text: print("Word found") else: print("Word not found") text = input() word = input() search(text, word)
30th Sep 2021, 11:37 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Probare
30th Sep 2021, 11:38 AM
Sadegh Mejias
0
Erlénio.RS , it's funny how i can read Spanish even without translator, because words look similar to English...
30th Sep 2021, 11:39 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Erlénio.RS , each true...
30th Sep 2021, 11:42 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Aleksei Radchenkov me sigue generando error
30th Sep 2021, 11:53 AM
Sadegh Mejias
0
Sadegh Mejias ,esto definitivamente funciona, solo revisado def search (text, word): if word in text: print("Word found") else: print("Word not found") text = input() word = input() search(text, word)
30th Sep 2021, 11:57 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Podrian ayudarme con esye codigo? print('Introduce the quantity of money\r\n') quantity = float(input) print('Introduce the quantity of days\r\n') days = int(input) print('Result: , quantity*(2**days)')
1st Oct 2021, 6:53 PM
Sadegh Mejias
0
Solo tienes que checar si Word se encuentra dentro del texto y hacer los respectivos returns. Así: def search(text, word): if word in text: return "Word found" else : return "Word not found" text = input() word = input() print(search(text, word))
1st Oct 2021, 10:14 PM
Alvin Asael Amaya Pineda
Alvin Asael Amaya Pineda - avatar
0
find en la consulta si esta lanpalabra es -1
2nd Oct 2021, 12:41 AM
dario higuera moreno
dario higuera moreno - avatar