{ "blocks": { "languageVersion": 0, "blocks": [ { "type": "variables_set", "id": "set_lista", "x": 50, "y": 50, "fields": { "VAR": { "id": "numeros" } }, "inputs": { "VALUE": { "block": { "type": "lists_create_with", "id": "create_list", "extraState": { "itemCount": 5 }, "inputs": { "ADD0": { "block": { "type": "math_number", "id": "num_1", "fields": { "NUM": 23 } } }, "ADD1": { "block": { "type": "math_number", "id": "num_2", "fields": { "NUM": 5 } } }, "ADD2": { "block": { "type": "math_number", "id": "num_3", "fields": { "NUM": 42 } } }, "ADD3": { "block": { "type": "math_number", "id": "num_4", "fields": { "NUM": 8 } } }, "ADD4": { "block": { "type": "math_number", "id": "num_5", "fields": { "NUM": 15 } } } } } } }, "next": { "block": { "type": "variables_set", "id": "set_maior", "fields": { "VAR": { "id": "maior" } }, "inputs": { "VALUE": { "block": { "type": "lists_getIndex", "id": "get_first", "fields": { "MODE": "GET", "WHERE": "FIRST" }, "inputs": { "VALUE": { "block": { "type": "variables_get", "id": "get_lista_first", "fields": { "VAR": { "id": "numeros" } } } } } } } }, "next": { "block": { "type": "controls_forEach", "id": "foreach_loop", "fields": { "VAR": { "id": "numero" } }, "inputs": { "LIST": { "block": { "type": "variables_get", "id": "get_lista", "fields": { "VAR": { "id": "numeros" } } } }, "DO": { "block": { "type": "controls_if", "id": "check_maior", "inputs": { "IF0": { "block": { "type": "logic_compare", "id": "compare_gt", "fields": { "OP": "GT" }, "inputs": { "A": { "block": { "type": "variables_get", "id": "get_numero", "fields": { "VAR": { "id": "numero" } } } }, "B": { "block": { "type": "variables_get", "id": "get_maior", "fields": { "VAR": { "id": "maior" } } } } } } }, "DO0": { "block": { "type": "variables_set", "id": "update_maior", "fields": { "VAR": { "id": "maior" } }, "inputs": { "VALUE": { "block": { "type": "variables_get", "id": "get_numero_update", "fields": { "VAR": { "id": "numero" } } } } } } } } } } }, "next": { "block": { "type": "text_print", "id": "print_result", "inputs": { "TEXT": { "block": { "type": "text_join", "id": "join_text", "extraState": { "itemCount": 2 }, "inputs": { "ADD0": { "block": { "type": "text", "id": "label", "fields": { "TEXT": "Maior nĂºmero: " } } }, "ADD1": { "block": { "type": "variables_get", "id": "get_maior_final", "fields": { "VAR": { "id": "maior" } } } } } } } } } } } } } } } ] }, "variables": [ { "name": "numeros", "id": "numeros" }, { "name": "maior", "id": "maior" }, { "name": "numero", "id": "numero" } ] }