your_money = 2
donut_price = 2
if donut_price <= your_money:
print("Yes! You can buy a donut!")
else:
print("Sorry, you don't have enough money to buy a yummy donut.")
# End of program
  • Review the code snippet and watch the flowchart get constructed as you press Next.
  • Pay close attention to how the flowchart relates to the code.
  • Also, you'll notice we're using a conditional operator you haven't seen before '<='.
  • '<=' is less than or equal too and is the same as '<' except now the two values can be equal.