#851. 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 (16) check (2) check (12) check (14)
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(16)
check(2)
check(12)
check(14)
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(16);
check(2);
check(12);
check(14);
💡 Not sure? Build it in Scratch and try it out.