Aug-24-2019, 01:18 PM
shoplist = [" blueberries", " rasberries"," apples", " soda", " diet coke", " coffee beans"]
indicator = int(input(" Which of the shopping list do you want to know?"))
if indicator == 0:
print(" blueberries")
elif indicator == 1:
print(" rasberries")
elif indicator == 2:
print(" apples")
elif indicator == 3:
print(" soda")
elif indicator == 4:
print(" diet coke")
elif indicator == 5:
print(" coffee beans")
elif indicator >= 5:
print(" you are out of range")# If the list is longer it will be time consuming to write all of this elif statements is there a ways to make the outcome automatic.
