#806. 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 (19) check (9) check (6) check (5) check (13)
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(19)
check(9)
check(6)
check(5)
check(13)
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(19);
check(9);
check(6);
check(5);
check(13);
💡 Not sure? Build it in Scratch and try it out.