ScratchData LogoScratchData
Back to scratchlycaterton's profile

Debugging Challenge #3 (Advanced)

SCscratchlycaterton•Created July 26, 2023
Debugging Challenge #3 (Advanced)
0
0
27 views
View on Scratch

Instructions

Here is a code sequence that needs some debugging. We want to stop the fish from reaching the pink coral by moving the diver up and down to block its path using the up and down arrow keys. If the fish reaches the coral, the player should lose one point. The problem is the player is losing too many points when the fish touches the coral. We only want the player to lose one point each time. The other problem is the player is losing a point when the fish is touching the starfish. Run the code multiple times. Can you debug and come up with a solution so the player only loses one point when touching the coral and doesn't lose any points when touching the starfish?

Description

WARNING: Don't look at the possible solution sprite until you've tried debugging the code first yourself!

Project Details

Project ID877715309
CreatedJuly 26, 2023
Last ModifiedSeptember 7, 2023
SharedJuly 27, 2023
Visibilityvisible
CommentsDisabled