21 August 2020
Code
# Define a function
def find_panda_in_zoo(x):
y = 'panda' in x
if (y==True):
return "Panda is in the zoo!"
else:
return "No Panda!"
# Create a list
zoo = ['monkey', 'lion', 'elephant', 'panda']
# Call function
find_panda_in_zoo(zoo)
'Panda is in the zoo!'
Any errors in code above?
Please send a message.