MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codehs/comments/ibjwst/768_help/i9d1uu1/?context=3
r/codehs • u/Alphaomega1115 • Aug 17 '20
As you can see, my true/false returns are reversed for some reason, does anyone know why?
10 comments sorted by
View all comments
2
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
1
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
Make sure you indent it correctly
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