{ "blocks": { "languageVersion": 0, "blocks": [ { "type": "variables_set", "id": "set_numero", "x": 50, "y": 50, "fields": { "VAR": { "id": "numero" } }, "inputs": { "VALUE": { "block": { "type": "math_number", "id": "input_num", "fields": { "NUM": 7 } } } }, "next": { "block": { "type": "controls_if", "id": "check_par", "extraState": { "hasElse": true }, "inputs": { "IF0": { "block": { "type": "logic_compare", "id": "compare_mod", "fields": { "OP": "EQ" }, "inputs": { "A": { "block": { "type": "math_modulo", "id": "modulo", "inputs": { "DIVIDEND": { "block": { "type": "variables_get", "id": "get_num", "fields": { "VAR": { "id": "numero" } } } }, "DIVISOR": { "shadow": { "type": "math_number", "id": "divisor_2", "fields": { "NUM": 2 } } } } } }, "B": { "block": { "type": "math_number", "id": "zero", "fields": { "NUM": 0 } } } } } }, "DO0": { "block": { "type": "text_print", "id": "print_par", "inputs": { "TEXT": { "block": { "type": "text_join", "id": "join_par", "extraState": { "itemCount": 2 }, "inputs": { "ADD0": { "block": { "type": "variables_get", "id": "get_num_par", "fields": { "VAR": { "id": "numero" } } } }, "ADD1": { "block": { "type": "text", "id": "text_par", "fields": { "TEXT": " é PAR" } } } } } } } } }, "ELSE": { "block": { "type": "text_print", "id": "print_impar", "inputs": { "TEXT": { "block": { "type": "text_join", "id": "join_impar", "extraState": { "itemCount": 2 }, "inputs": { "ADD0": { "block": { "type": "variables_get", "id": "get_num_impar", "fields": { "VAR": { "id": "numero" } } } }, "ADD1": { "block": { "type": "text", "id": "text_impar", "fields": { "TEXT": " é ÍMPAR" } } } } } } } } } } } } } ] }, "variables": [ { "name": "numero", "id": "numero" } ] }