{
  "name": "moleculas_h2o",
  "savedAt": "2026-07-15T00:06:15.595339",
  "blocks": [
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "radioEnlace",
        "25"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "longitudEnlace",
        "16"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "numO",
        "4"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "numH",
        "8"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "oxigenos",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hidrogenos",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "oEnlaces",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "oAngulo",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hOcupado",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hDueno",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hSlot",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "i",
        "numO"
      ],
      "children": [
        {
          "def": {
            "template": "{0} = Turtle()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.shape({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o",
            "\"point\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.pensize({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o",
            "16"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.color({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o",
            "\"red\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.penup()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.goto({1}, {2})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o",
            "randint(-120, 120)",
            "randint(-120, 120)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.setheading({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "o",
            "randint(0, 359)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oxigenos",
            "o"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oEnlaces",
            "0"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oAngulo",
            "randint(0, 359)"
          ],
          "children": []
        }
      ]
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "j",
        "numH"
      ],
      "children": [
        {
          "def": {
            "template": "{0} = Turtle()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.shape({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h",
            "\"point\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.pensize({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h",
            "8"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.color({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h",
            "\"white\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.penup()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.goto({1}, {2})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h",
            "randint(-120, 120)",
            "randint(-120, 120)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.setheading({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "h",
            "randint(0, 359)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "hidrogenos",
            "h"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "hOcupado",
            "False"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "hDueno",
            "-1"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "hSlot",
            "0"
          ],
          "children": []
        }
      ]
    },
    {
      "def": {
        "template": "while {0}:",
        "category": "control",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "True"
      ],
      "children": [
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "i",
            "numO"
          ],
          "children": [
            {
              "def": {
                "template": "if {0}:",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": true,
                "isReporter": false
              },
              "values": [
                "oEnlaces[i] < 2"
              ],
              "children": [
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "o",
                    "oxigenos[i]"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0}.right({1})",
                    "category": "tortuga",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "o",
                    "randint(0, 20) - 10"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0}.forward({1})",
                    "category": "tortuga",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "o",
                    "1"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "o.xcor() > 150 or o.xcor() < -150 or o.ycor() > 150 or o.ycor() < -150"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0}.setheading({1})",
                        "category": "tortuga",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "o",
                        "o.heading() + 180"
                      ],
                      "children": []
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "j",
            "numH"
          ],
          "children": [
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "h",
                "hidrogenos[j]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "if {0}:",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": true,
                "isReporter": false
              },
              "values": [
                "hOcupado[j]"
              ],
              "children": [
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "i",
                    "hDueno[j]"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "o",
                    "oxigenos[i]"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "anguloBase",
                    "oAngulo[i]"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "hSlot[j] == 1"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "anguloBase",
                        "anguloBase + 104.5"
                      ],
                      "children": []
                    }
                  ]
                },
                {
                  "def": {
                    "template": "{0}.goto({1}, {2})",
                    "category": "tortuga",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "h",
                    "o.xcor() + longitudEnlace * cos(anguloBase * pi / 180)",
                    "o.ycor() + longitudEnlace * sin(anguloBase * pi / 180)"
                  ],
                  "children": []
                }
              ]
            },
            {
              "def": {
                "template": "else:",
                "category": "control",
                "slots": [],
                "isContainer": true,
                "isReporter": false
              },
              "values": [],
              "children": [
                {
                  "def": {
                    "template": "{0}.right({1})",
                    "category": "tortuga",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "h",
                    "randint(0, 40) - 20"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0}.forward({1})",
                    "category": "tortuga",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "h",
                    "5"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "h.xcor() > 150 or h.xcor() < -150 or h.ycor() > 150 or h.ycor() < -150"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0}.setheading({1})",
                        "category": "tortuga",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "h",
                        "h.heading() + 180"
                      ],
                      "children": []
                    }
                  ]
                },
                {
                  "def": {
                    "template": "for {0} in range({1}):",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "i",
                    "numO"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "if {0}:",
                        "category": "control",
                        "slots": [
                          {
                            "options": []
                          }
                        ],
                        "isContainer": true,
                        "isReporter": false
                      },
                      "values": [
                        "oEnlaces[i] < 2"
                      ],
                      "children": [
                        {
                          "def": {
                            "template": "{0} = {1}",
                            "category": "variables",
                            "slots": [
                              {
                                "options": []
                              },
                              {
                                "options": []
                              }
                            ],
                            "isContainer": false,
                            "isReporter": false
                          },
                          "values": [
                            "o",
                            "oxigenos[i]"
                          ],
                          "children": []
                        },
                        {
                          "def": {
                            "template": "if {0}:",
                            "category": "control",
                            "slots": [
                              {
                                "options": []
                              }
                            ],
                            "isContainer": true,
                            "isReporter": false
                          },
                          "values": [
                            "h.distance(o) < radioEnlace"
                          ],
                          "children": [
                            {
                              "def": {
                                "template": "{0}[{1}] = {2}",
                                "category": "variables",
                                "slots": [
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  }
                                ],
                                "isContainer": false,
                                "isReporter": false
                              },
                              "values": [
                                "hSlot",
                                "j",
                                "oEnlaces[i]"
                              ],
                              "children": []
                            },
                            {
                              "def": {
                                "template": "{0}[{1}] = {2}",
                                "category": "variables",
                                "slots": [
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  }
                                ],
                                "isContainer": false,
                                "isReporter": false
                              },
                              "values": [
                                "hDueno",
                                "j",
                                "i"
                              ],
                              "children": []
                            },
                            {
                              "def": {
                                "template": "{0}[{1}] = {2}",
                                "category": "variables",
                                "slots": [
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  }
                                ],
                                "isContainer": false,
                                "isReporter": false
                              },
                              "values": [
                                "hOcupado",
                                "j",
                                "True"
                              ],
                              "children": []
                            },
                            {
                              "def": {
                                "template": "{0}.color({1})",
                                "category": "tortuga",
                                "slots": [
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  }
                                ],
                                "isContainer": false,
                                "isReporter": false
                              },
                              "values": [
                                "h",
                                "\"#00CFCF\""
                              ],
                              "children": []
                            },
                            {
                              "def": {
                                "template": "{0}[{1}] = {2}",
                                "category": "variables",
                                "slots": [
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  },
                                  {
                                    "options": []
                                  }
                                ],
                                "isContainer": false,
                                "isReporter": false
                              },
                              "values": [
                                "oEnlaces",
                                "i",
                                "oEnlaces[i] + 1"
                              ],
                              "children": []
                            },
                            {
                              "def": {
                                "template": "if {0}:",
                                "category": "control",
                                "slots": [
                                  {
                                    "options": []
                                  }
                                ],
                                "isContainer": true,
                                "isReporter": false
                              },
                              "values": [
                                "oEnlaces[i] == 2"
                              ],
                              "children": [
                                {
                                  "def": {
                                    "template": "{0}.color({1})",
                                    "category": "tortuga",
                                    "slots": [
                                      {
                                        "options": []
                                      },
                                      {
                                        "options": []
                                      }
                                    ],
                                    "isContainer": false,
                                    "isReporter": false
                                  },
                                  "values": [
                                    "o",
                                    "\"purple\""
                                  ],
                                  "children": []
                                },
                                {
                                  "def": {
                                    "template": "print({0})",
                                    "category": "salida",
                                    "slots": [
                                      {
                                        "options": []
                                      }
                                    ],
                                    "isContainer": false,
                                    "isReporter": false
                                  },
                                  "values": [
                                    "\"Molécula de agua formada\""
                                  ],
                                  "children": []
                                }
                              ]
                            },
                            {
                              "def": {
                                "template": "break",
                                "category": "control",
                                "slots": [],
                                "isContainer": false,
                                "isReporter": false
                              },
                              "values": [],
                              "children": []
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
