+ 3
Whats wrong in this code
This is the code i am trying text = input() word = input() def search(x,y): if word in text: print("Word found") else: print("Word not found") print(search(text,word))
2 Respostas
+ 9
Since you used x and y as parameters inside the function, you have to use those variables (x, y) instead of the original arguments (text, word).
Another thing is that you dont need to print after the call of the function since the function is not returning any value. The output is already printed inside the function.
https://code.sololearn.com/cf4A6qW793wq/?ref=app
+ 2
Thanks Cyan