+ 1
code coach izzy the iguana
i need to have the code read the string and give points based on what food is there. Is points over 10 , he should come down from the tree. I only passed 3/6 tests and cant figure it out! Thanks! snacks = input() snacks = snacks.split(' ') points = 0 for x in snacks: if x == 'lettuce': points += 5 elif x == 'carrot': points += 4 elif x == 'mango': points += 9 else: points += 0 if points >= 10: print('Come on Down!') else: print('Time to wait')
3 ответов
+ 6
Each word starts with capital letters.
'Lettuce'
'Carrot'
'Mango'
+ 3
i knew it was something dumb i was doing, thanks boss!
+ 2
Your welcome :)