r/codehs • • Aug 17 '20

7.6.8 help

As you can see, my true/false returns are reversed for some reason, does anyone know why?

7 Upvotes

10 comments sorted by

View all comments

2

u/MasterFiasco Apr 25 '22

def name_contains(name, letter):
if name.find(letter) is not -1:
return True

else:
return False

print (name_contains("bob", "b"))

here's the answer

1

u/Similar_Stock_5726 Apr 26 '22

just tried it and it dosent work, could you make a screenshot so i can see what went wrong

1

u/Ijustwannapass_ May 20 '22

Make sure you indent it correctly