Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 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
19 Respostas
+ 5
def search(text,word):
if word in text:
print("Word found")
else:
print("Word not found")
text = input()
word = input()
(search(text, word))
+ 4
Saben, es bueno hablar tambiĆ©n nuestra lengua nativa, serĆa bueno hacer una rica comunidad en espaƱol aquĆ.
+ 2
Aleksei Radchenkov for me it's easier because it has a small relationship with Portuguese
+ 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))
0
envĆa la pregunta completa
0
Por favor muƩstranos tu intento
0
ErlĆ©nio.RS , oh common can't u speak Spanish? š¤£
0
Aleksei Radchenkov habĆa olvidado
0
def search(text, Word):
if(text.find(Word)):
print("Word found")
else:
print("Word not found")
text = input()
word = input()
search(text, word)
0
Ese es mi codigo, pero solo funciona para resultado uno, y al realizar resultado 2, me da todo incorrecto
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)
0
Probare
0
ErlƩnio.RS , it's funny how i can read Spanish even without translator, because words look similar to English...
0
ErlƩnio.RS , each true...
0
Aleksei Radchenkov me sigue generando error
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)
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)')
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))
0
find en la consulta si esta lanpalabra es -1