diff --git a/Chapter_05/5-07_favorite_fruit.py b/Chapter_05/5-07_favorite_fruit.py new file mode 100644 index 0000000..59a8dcf --- /dev/null +++ b/Chapter_05/5-07_favorite_fruit.py @@ -0,0 +1,16 @@ +# Exercise 5-7 Favorite Fruit +# Learning Objective: Write five if statements based on a list of favorite fruits. + +favorite_fruits = ['apples', 'pears', 'bananas'] + +if 'bananas' in favorite_fruits: + print('You really like bananas!') +if 'pears' in favorite_fruits: + print('You really like pears!') +if 'apples' in favorite_fruits: + print('You really like apples!') +if 'strawberries' in favorite_fruits: + print('You really like strawberries') +if 'blueberries' in favorite_fruits: + print("You really like blueberries") + \ No newline at end of file