Completed 5-7 Favorite Fruit

This commit is contained in:
cheeks 2025-01-24 18:03:20 -05:00
parent 505801bb45
commit f09c5f103c

View File

@ -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")