Time for a challenge
Challenge #1
Write one single program for the candy dispenser to dispense, as follows:
- One piece of candy when yellow is detected
- Two pieces of candy when blue is detected
- Three pieces of candy when green is detected
Try to add unique features such as display and sound blocks to make this activity more interactive and user-friendly. You will have to use if-else
conditions to set up the logic for this activity. You can consider displaying money by the application of variables and see how much a single user can spend.