Lessons 3.5, 3.6 and 3.7 hacks
print(20 == 10) # prints value false
x = 30
y = 20
z = 10
print(x > y - z) # changed addition to subtraction
# Manipulate the variables x, y, and z to make the below statement return true
print(x == z + y)
animals = ["lion", "tiger", "wildebeest", "shark", "jellyfish", "blobfish", "raven"]
for i in animals:
if i == "wildebeest" or "lion": # What boolean value does this statement cause? true
print("This animal lives in the desert")
else:
print(i)
# Practice
# Using only one more if statement, alter the code to print out a statement saying if an animal lives in the desert, based on booleans
Meals = {"Chicken Alfredo": ["Chicken", 60],
"Cheese Quesadilla": ["None", 10],
"Beef Wellington": ["Beef", 150]
}
for meal in Meals.values():
if meal[0] == "None" and meal[1] <= 30:
print("cook this meal")