#856. 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 (20) check (2) check (10)
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(20)
check(2)
check(10)
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(20);
check(2);
check(10);
💡 Not sure? Build it in Scratch and try it out.