0
Guys please help me l want to create the search engine in python
I have to enter a text then find the word in the text there shld be use of if statements
8 Antworten
+ 7
Qhufu ,
i do not agree with your comment about giving a complete code. at the time when i give the op my support, he has already posted his code, and after this i have given my comments and a slightly reworked version of his code.
but i totally agree with you, that we should not give a complete code unless the op has posted a serious attempt.
+ 5
Thandolwenkosi ,
this is your code slightly modified so that it is working. see also the comments and hints
#text=input() # these 3 lines should be placed after the function.
#word=input()
# print(search(text,word))
def search (txt, wrd): # we need to take the arguments from the function call and store them in variables
if wrd in txt: # was: if search in txt: #not correct
return("Word found")
else:
return ("Word not found")
text=input()
word=input()
print(search(text,word)) # need to have no indentation here
+ 1
Show us ur try so we can help u
+ 1
text=input()
word=input()
print(search(text,word))
def search ():
if search in text:
return("Word found")
else:
return ("Word not found")
Thus my trial
+ 1
Hi! You can take a look at this one:
https://code.sololearn.com/cUfknSL2J4by/?ref=app
+ 1
Thank u so much guys may the Good Lord bless you
0
/* name - "Slim", type - "Giraffe", country_id - 1 */
INSERT INTO animals(name,type,country_id)
values('Slim' , 'Girafee' , 1);
SELECT animals.name,animals.type,animals.country_id,countries.id,countries.country
FROM animals,countries;
FROM animals INNER JOIN countries
ON animals.country_id=countries.country
ORDER BY country ;
Guys please help the above is my code on SQL l was given two tables one of the tables l was suppose to a some elements then join them using a INNER JOIN but am not getting the desired solution so plz help