Step 4: Adding the Second Rating

Goal:


Let’s add the second rating when the power is between 50 and 120.

Steps:

  1. Select the “Sprite2” sprite
  2. From Events place a “when I receive” block
  3. Change the message to be “PumpkinSmashed!
  4. From Control place an if then block
  5. From Operators place an and block inside the if then block
  6. From Operators place a < (less than) block on the left side of the and block
  7. From Variables place “Power:” on the left side of the < block
  8. Type in 120 on the right side of the < block
  9. From Operators place a > (greater than) block on the right side of the and block
  10. From Variables place “Power:” on the left side of the > block
  11. Type in 50 on the right side of the > block
  12. From Looks place a show block inside the if then block

Code: