{ "blocks": { "languageVersion": 0, "blocks": [ { "type": "variables_set", "id": "set_celsius", "x": 50, "y": 50, "fields": { "VAR": { "id": "celsius" } }, "inputs": { "VALUE": { "block": { "type": "math_number", "id": "temp_celsius", "fields": { "NUM": 25 } } } }, "next": { "block": { "type": "variables_set", "id": "set_fahrenheit", "fields": { "VAR": { "id": "fahrenheit" } }, "inputs": { "VALUE": { "block": { "type": "math_arithmetic", "id": "calc_fahrenheit", "fields": { "OP": "ADD" }, "inputs": { "A": { "block": { "type": "math_arithmetic", "id": "multiply", "fields": { "OP": "MULTIPLY" }, "inputs": { "A": { "block": { "type": "variables_get", "id": "get_celsius", "fields": { "VAR": { "id": "celsius" } } } }, "B": { "shadow": { "type": "math_number", "id": "factor", "fields": { "NUM": 1.8 } } } } } }, "B": { "shadow": { "type": "math_number", "id": "add_32", "fields": { "NUM": 32 } } } } } } }, "next": { "block": { "type": "text_print", "id": "print_celsius", "inputs": { "TEXT": { "block": { "type": "text_join", "id": "join_celsius", "extraState": { "itemCount": 2 }, "inputs": { "ADD0": { "block": { "type": "variables_get", "id": "get_celsius_print", "fields": { "VAR": { "id": "celsius" } } } }, "ADD1": { "block": { "type": "text", "id": "text_celsius", "fields": { "TEXT": "°C" } } } } } } }, "next": { "block": { "type": "text_print", "id": "print_fahrenheit", "inputs": { "TEXT": { "block": { "type": "text_join", "id": "join_fahrenheit", "extraState": { "itemCount": 2 }, "inputs": { "ADD0": { "block": { "type": "variables_get", "id": "get_fahrenheit_print", "fields": { "VAR": { "id": "fahrenheit" } } } }, "ADD1": { "block": { "type": "text", "id": "text_fahrenheit", "fields": { "TEXT": "°F" } } } } } } } } } } } } } } ] }, "variables": [ { "name": "celsius", "id": "celsius" }, { "name": "fahrenheit", "id": "fahrenheit" } ] }