When "Give me apple" is clicked, a full, half or quarter apple will drop. You could use left and right arrow keys to control to sprite to catch the apple. After catching the apple, you need to go to the right basket to drop it. After playing the game for a while, you could start assembling a script that lets the sprite automatically sort the apples.