This is a simple calculator to work out the hydration of any bread dough you happen to be making. Just enter the total mass of flour in grams, then the total volume of water in millilitres. It's accurate enough as long as used with sensible dough mixtures! :)
I'd run a code club session today. When I got home I was working out some bread recipes with a calculator and thought it might be fun to write a simple calculator in Scratch. I've left the variables on display to help anyone see how the code works in realtime. I didn't really get the idea from anyone, I just threw it together using the default Scratch sprites and backgrounds. I hope it shows a few simple ways of manipulating variables. The calculation involved is: Volume of water (in millilitres) divided by the mass of flour (in Kilograms) multiplied by 100. This will give you the percentage of hydration, in percent! ;) The variables are: flour - total mass of flour water - total volume of water ratio - the result of water divided by flour percentage - the result of ratio multiplied by 100 first - the first character in the percentage variable second - the second character in the percentage variable third - the character (if any) that occurs fourth in the percentage variable, assuming that the third character in the variable will be a decimal point if the inputted data is within sensible ratios. ************************************** I apologise now to any real programmers... ;) **************************************