{"id":478,"date":"2025-11-19T16:11:25","date_gmt":"2025-11-19T16:11:25","guid":{"rendered":"https:\/\/cuentoskecuentan.com\/?p=478"},"modified":"2025-11-19T16:11:25","modified_gmt":"2025-11-19T16:11:25","slug":"valor-posicional-hundreds-tens-ones","status":"publish","type":"post","link":"https:\/\/cuentoskecuentan.com\/?p=478","title":{"rendered":"Valor posicional (Hundreds, tens, ones)"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n  <title>Valor Posicional<\/title>\n  <style>\n    body {\n      font-family: Arial, sans-serif;\n      background-color: #f7f2f8;\n      text-align: center;\n      padding: 20px;\n      color: #333;\n    }\n\n    h1 {\n      color: #793d7a;\n      font-size: 2rem;\n    }\n\n    .card {\n      background: white;\n      width: 90%;\n      max-width: 400px;\n      margin: 20px auto;\n      padding: 20px;\n      border-radius: 16px;\n      box-shadow: 0 4px 10px rgba(0,0,0,0.1);\n      border-top: 10px solid #793d7a;\n    }\n\n    button {\n      background-color: #793d7a;\n      color: white;\n      border: none;\n      padding: 12px 20px;\n      border-radius: 10px;\n      font-size: 1rem;\n      cursor: pointer;\n      margin-top: 15px;\n    }\n\n    button:hover {\n      opacity: 0.9;\n    }\n\n    .input-box {\n      display: flex;\n      gap: 10px;\n      justify-content: center;\n      margin-top: 10px;\n    }\n\n    input {\n      width: 70px;\n      padding: 10px;\n      border-radius: 8px;\n      border: 2px solid #793d7a;\n      text-align: center;\n      font-size: 1.1rem;\n    }\n\n    .correct { color: green; font-weight: bold; }\n    .incorrect { color: red; font-weight: bold; }\n  <\/style>\n<\/head>\n<body>\n\n  <h1>Pr\u00e1ctica de Valor Posicional<\/h1>\n\n  <div class=\"card\">\n    <h2>Nivel <span id=\"nivelActual\">1<\/span><\/h2>\n    <p>N\u00famero:<\/p>\n    <h1 id=\"numeroGenerado\">&#8212;<\/h1>\n\n    <div class=\"input-box\" id=\"inputsContainer\">\n      <input id=\"tens\" placeholder=\"Tens\" \/>\n      <input id=\"ones\" placeholder=\"Ones\" \/>\n    <\/div>\n\n    <p id=\"feedback\"><\/p>\n\n    <button onclick=\"verificar()\">Verificar<\/button>\n    <button onclick=\"nuevoNumero()\">Nuevo n\u00famero<\/button>\n    <br><br>\n    <button onclick=\"cambiarNivel()\">Cambiar nivel<\/button>\n  <\/div>\n\n<script>\n  let nivel = 1;\n  let numeroActual = 0;\n\n  function cambiarNivel() {\n    nivel = nivel === 1 ? 2 : 1;\n    document.getElementById('nivelActual').textContent = nivel;\n    configurarInputs();\n    nuevoNumero();\n  }\n\n  function configurarInputs() {\n    const container = document.getElementById('inputsContainer');\n    container.innerHTML = '';\n\n    if (nivel === 1) {\n      container.innerHTML = `\n        <input id=\"tens\" placeholder=\"Tens\" \/>\n        <input id=\"ones\" placeholder=\"Ones\" \/>\n      `;\n    } else {\n      container.innerHTML = `\n        <input id=\"hundreds\" placeholder=\"Hundreds\" \/>\n        <input id=\"tens\" placeholder=\"Tens\" \/>\n        <input id=\"ones\" placeholder=\"Ones\" \/>\n      `;\n    }\n  }\n\n  function nuevoNumero() {\n    numeroActual = nivel === 1 ? Math.floor(Math.random()*90 + 10) : Math.floor(Math.random()*900 + 100);\n    document.getElementById('numeroGenerado').textContent = numeroActual;\n    document.getElementById('feedback').textContent = '';\n    const inputs = document.querySelectorAll('input');\n    inputs.forEach(i => i.value = '');\n  }\n\n  function verificar() {\n    const hundreds = nivel === 2 ? Math.floor(numeroActual \/ 100) : 0;\n    const tens = Math.floor((numeroActual % 100) \/ 10);\n    const ones = numeroActual % 10;\n\n    let h = nivel === 2 ? document.getElementById('hundreds').value : 0;\n    let t = document.getElementById('tens').value;\n    let o = document.getElementById('ones').value;\n\n    if (parseInt(h) === hundreds && parseInt(t) === tens && parseInt(o) === ones) {\n      document.getElementById('feedback').textContent = '\u00a1Correcto!';\n      document.getElementById('feedback').className = 'correct';\n    } else {\n      document.getElementById('feedback').textContent = 'Intenta nuevamente.';\n      document.getElementById('feedback').className = 'incorrect';\n    }\n  }\n\n  configurarInputs();\n  nuevoNumero();\n<\/script>\n\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Valor Posicional Pr\u00e1ctica de Valor Posicional Nivel 1 N\u00famero: &#8212; Verificar Nuevo n\u00famero Cambiar nivel<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-478","post","type-post","status-publish","format-standard","hentry","category-apps-matematicas"],"_links":{"self":[{"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=\/wp\/v2\/posts\/478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=478"}],"version-history":[{"count":2,"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=\/wp\/v2\/posts\/478\/revisions"}],"predecessor-version":[{"id":484,"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=\/wp\/v2\/posts\/478\/revisions\/484"}],"wp:attachment":[{"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cuentoskecuentan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}