0

The given code takes a text and a word as input and passes them to a function called search(). The search() function should

I tried solving thos question but it failed can anyone help me or give me a small hint

29th Aug 2021, 10:15 AM
Neelam Sangar
Neelam Sangar - avatar
8 odpowiedzi
+ 4
we will help u but first u need to share your code
29th Aug 2021, 10:41 AM
Pariket Thakur
Pariket Thakur - avatar
+ 2
Is it from python course ??
29th Aug 2021, 10:36 AM
Yash Wable 🇮🇳
Yash Wable 🇮🇳 - avatar
+ 1
Neelam Sangar Have a look "Code Blocks and Indentation | Flow of Control in Python | Peachpit" https://www.peachpit.com/articles/article.aspx?p=1312792&seqNum=3 It should be def search(text,word) : if word in text : print ('Word found') else: print('Word not found') text = input() word = input() search(text,word)
30th Aug 2021, 1:27 PM
Pariket Thakur
Pariket Thakur - avatar
30th Aug 2021, 2:01 PM
Pariket Thakur
Pariket Thakur - avatar
0
Yes its from phyton course
30th Aug 2021, 9:46 AM
Neelam Sangar
Neelam Sangar - avatar
0
Shairing my code with u HrCoder
30th Aug 2021, 9:46 AM
Neelam Sangar
Neelam Sangar - avatar
0
It have very simple solution just use 'in' operator to search word is in text or not
30th Aug 2021, 9:58 AM
Yash Wable 🇮🇳
Yash Wable 🇮🇳 - avatar
0
Def search(text,word) : If word in text : Print ('word found') else: Print('word not found') text=input() Word=input() Search(text,word)
30th Aug 2021, 9:59 AM
Neelam Sangar
Neelam Sangar - avatar