Completed 5-7 Favorite Fruit
This commit is contained in:
parent
505801bb45
commit
f09c5f103c
16
Chapter_05/5-07_favorite_fruit.py
Normal file
16
Chapter_05/5-07_favorite_fruit.py
Normal 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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user