stage.set_background("fall") girl = codesters.Sprite("person10", -200, -100) boy = codesters.Sprite("person3", 200, -100) recycling = codesters.Sprite("recyclingbin", -110, -140) recycling.set_size(.8) trash = codesters.Sprite("trashcan", 110, -140) trash.set_size(.8) compost = codesters.Sprite("cardboardbox", 0, -140) compost.set_size(.8) applecore = codesters.Sprite("applecore", 180, -215) applecore.set_size(.5) apple_core = boy.ask("We found this apple core on the ground. Should we recycle, compost, or throw it away?") if apple_core == "compost": # add your code here applecore.go_to(0, -50) applecore.move_down(120) applecore.hide() boy.say("Great job!") stage.wait(3) boy.say("") if apple_core == "throw away": # add your code here boy.say("Try again!") stage.wait(3) boy.say("") if apple_core == "recycle": # add your code here boy.say("Try again!") stage.wait(3) boy.say("") stage.wait(3) fishbones = codesters.Sprite("fishbones", -180, -215) fishbones.set_size(.5) fish_bones = girl.ask("We found these fish bones on the ground. Should we recycle, compost, or throw them away?") if fish_bones == "compost": girl.say("Try again!") stage.wait(3) girl.say("") if fish_bones == "throw away": fishbones.go_to(120, 60) fishbones.move_down(140) fishbones.hide() girl.say("Great job!") stage.wait(3) girl.say("") if fish_bones == "recycle": girl.say("Try again!") stage.wait(3) girl.say("") stage.wait(3) plasticbag = codesters.Sprite("plasticbag", -180, -215) plastic_bag = girl.ask("We found this plastic bag on the ground. Should we recycle, compost, or throw it away?") if plastic_bag == "compost": girl.say("Try again!") stage.wait(3) girl.say("") if plastic_bag == "throw away": plasticbag.go_to(120, 60) plasticbag.move_down(140) plasticbag.hide() girl.say("Great job!") stage.wait(3) girl.say("") if plastic_bag == "recycle": girl.say("Try again!") stage.wait(3) girl.say("") stage.wait(3) sodacan = codesters.Sprite("sodacan", 180, -215) sodacan.set_size(.5) soda_can = boy.ask("We found this soda can on the ground. Should we recycle, compost, or throw it away?") if soda_can == "compost": boy.say("Nope! It should go in the recycling.") sodacan.go_to(-110, -10) sodacan.move_down(140) stage.wait(3) boy.say("") if soda_can == "recycle": sodacan.go_to(-110, -10) sodacan.move_down(100) sodacan.hide() boy.say("Great job!") stage.wait(3) boy.say("") if soda_can == "compost": boy.say("Nope! It should go in the recycling.") sodacan.go_to(-110, -10) sodacan.move_down(140) stage.wait(3) boy.say("") if soda_can == "compost": boy.say("Nope! It should go in the recycling.") sodacan.go_to(-110, -10) sodacan.move_down(140) stage.wait(3) boy.say("") if soda_can == "recycle": sodacan.go_to(-110, -10) sodacan.move_down(100) sodacan.hide() boy.say("Great job!") stage.wait(3) boy.say("") if soda_can == "compost": boy.say("Nope! It should go in the recycling.") sodacan.go_to(-110, -10) sodacan.move_down(140) stage.wait(3) boy.say("")
Support