How to Boost your Logic Skills (Series)? The “in” and “is” Keywords.
What is the output of this puzzle? meal_1 = "Meat" meal_2 = "Flaxseeds" meal_3 = "Marshmallows" healthyFoods = ["Kale", "Apple", "Strawberry", "Banana", "Flaxseeds"] def isHealthy(food): return food in healthyFoods m_1 = isHealthy(meal_1) m_2 = isHealthy(meal_2) m_3 = isHealthy(meal_3) print((not m_1 or m_2) and (meal_2 is "Flaxseeds") and isHealthy("Kale")) This puzzle shows two new …
How to Boost your Logic Skills (Series)? The “in” and “is” Keywords. Read More »