Water Use Calculator

Final Tweeks

On this card you’ll make a few small changes to control things like the speed of the animation. Customise the changes to suit your own program!

Change the number of steps after the stamp from 20 to 4. You’ll probably need make the first move bigger, maybe 60 instead of 45, to get the glass of water out from behind the text sprite again.

Move the wait out of the first loop and put it after the loop instead, but still inside the repeat until loop, and change the value to 1 or 2 seconds, or whatever you like.

Test it out, and change the numbers to suit you!

Finally, add a say block to have the sprite display the number of litres of water being shown.

sayjoinitemcounterofWaterAmounts litres!

I’m also adding in some code at the very end to change the sprite back to the monkey and get the user to think about ways to conserve water. If you want, you can add this code too.

repeatuntilcounter=lengthofSpriteschangecounterby1gotoitemcounterofSpritesmove45stepssayjoinitemcounterofWaterAmounts litres!repeatitemcounterofWaterAmountsmove20stepsstampwait0.5secondshidegotox:0y:0switchcostumetomonkey-asetsizeto100%showsayThink about ways you could use less water!for5seconds

Show me all the code!

Here is how the whole program looks now, do you can check it if something in yours is not working right:

whenclickedsetcounterto0eraseallgotox:0y:0settotalWaterto0setsizeto80%switchcostumetomonkey-aaskHow many times do you flush the toilet each week?andwaitsetflushestoanswerchangetotalWaterbyflushes*6askHow many minutes do you usually spend in the shower?andwaitsetshowerMinutestoansweraskHow many showers do you have per week?andwaitsetshowerstoanswerchangetotalWaterbyshowers*showerMinutes*7sayYou use...for2secondssayjointotalWater litres of water per week!for5secondssayHow about brushing your teeth?for2secondssayIt can be tempting to leave the tap running while you brush. But did you know...for4secondssay...a running tap loses 6 litres of water per minute?for3secondsswitchcostumetoglass water-asetsizeto35%repeatuntilcounter=lengthofSpriteschangecounterby1gotoitemcounterofSpritesmove45stepssayjoinitemcounterofWaterAmounts litres!repeatitemcounterofWaterAmountsmove20stepsstampwait0.5secondshidegotox:0y:0switchcostumetomonkey-asetsizeto100%showsayThink about ways you could use less water!for5seconds