0

Need help with this please, gives correct output, but solo learn wotn accept the project

def search(text, word): if word in text: print('word found') else: print("word not found") text = input() word = input() search(text, word)

29th Jul 2021, 10:29 PM
Michael Dhlamini
Michael Dhlamini - avatar
3 Respuestas
+ 2
Michael Dhlamini use the following # change your 2 print to return return "Word found" else: return "Word not found" # And change your last line to a print print(search(text, word)) # and yes capitalize Word
29th Jul 2021, 10:46 PM
BroFar
BroFar - avatar
+ 1
Thanks, I will pay more attention
29th Jul 2021, 10:55 PM
Michael Dhlamini
Michael Dhlamini - avatar
0
Actually, your initial suggestion worked, I can believe thats all it was
29th Jul 2021, 10:55 PM
Michael Dhlamini
Michael Dhlamini - avatar