0
Can someone help me with 42 Code project in Python for beginners pls?
7 odpowiedzi
+ 2
to complete the task, you need to remove the print command from the last line of code and call the function with parameters yourself
+ 2
programming is also a lot of mindfulness. sometimes even because of an extra semicolon or its absence, the whole large program collapses
+ 2
Be patient
“Any software engineer will likely give a new coder the same advice: be patient. Coding, while great, is one of the most frustrating things to learn. You’ll spend three hours staring at your code, wondering why it’s not working, only to be missing a semicolon somewhere. But when you finally get it working, it’s worth it.”– Jake Byman, Senior Software Engineer
+ 1
Hi! Have you any code for this? What help do you need?
+ 1
This is my code:
text = input()
word = input()
def search(t,w):
if w in t:
print("Word found")
else:
print("Word not found")
print(search(text, word))
+ 1
Bruv ty man such a little mistake i didnt see it
Ty mate
0
This is the task but i cant find my mistake in the code above:
The given code takes a text and a word as input and passes them to a function called search().
The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not.
Sample Input
"This is awesome"
"awesome"
Sample Output
Word found