#825. A checking block
When the green flag is clicked, what is the value of the **big** variable?
define check (n) if <(n) > (10)> then change [big v] by (1) else change [small v] by (1) end when green flag clicked set [big v] to (0) set [small v] to (0) check (18) check (10) check (3)
def check(n): # define check
global big, small
if n > 10:
big += 1
else:
small += 1
# When the green flag is clicked
big = 0
small = 0
check(18)
check(10)
check(3)
let big = 0, small = 0;
// define check
function check(n) {
if (n > 10) {
big += 1;
} else {
small += 1;
}
}
// When the green flag is clicked
big = 0;
small = 0;
check(18);
check(10);
check(3);
💡 Not sure? Build it in Scratch and try it out.