Home
Activities
Resources
CONTACT US
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
Back
Next
Back
Help me
🔊
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.
Next
Help for Flowcharts
Close modal
The correct answer(s) is:
Option 1. Make sure to read the explanation!
Press Next until you reach the end of the code!
Close help