Conditionals Exercise Answer Key
Answer Key
calories = 500
protein_amt = 12
sugar_amt = 33
organic = True
if calories <= 500 and protein_amt > 5:
print('This food is healthy')
else:
print('This food is unhealthy')
if sugar_amt < 20 or organic = True:
print('This food is within your diet')
else:
print('This food is not within your diet')
if not organic:
print('This food is not organic')
elif protein_amt == 10:
print('This food matches your protein intake levels')
else:
print("You shouldn't consume this food because it's not organic and doesn't match your protein intake levels")