{"id":1498,"date":"2024-10-16T19:24:34","date_gmt":"2024-10-16T22:24:34","guid":{"rendered":"https:\/\/desvendandoocodigo.com.br\/?p=1498"},"modified":"2024-10-17T15:36:08","modified_gmt":"2024-10-17T18:36:08","slug":"resumo-da-live-tiktok-16-10-2024","status":"publish","type":"post","link":"https:\/\/desvendandoocodigo.com.br\/?p=1498","title":{"rendered":"Resumo da Live TikTok 16\/10\/2024"},"content":{"rendered":"\n<p>Ol\u00e1 Pessoal! <\/p>\n\n\n\n<p>Na Live do dia 16\/10\/2024 praticamos l\u00f3gica de programa\u00e7\u00e3o com JavaScript.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MAIOR E MENOR N\u00daMERO \n\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;Document&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;script&gt;\n\n\n\n\n  let numero = Number(prompt(\"Digite um n\u00famero (ou um valor negativo para parar):\"));\n  let maior = numero;\n  let menor = numero;\n\n\n  while (numero &gt;= 0) {\n    numero = parseFloat(prompt(\"Digite outro n\u00famero (ou um valor negativo para parar):\"));\n\n\n    if (numero &gt;= 0) {\n        if (numero &gt; maior) {\n          maior = numero;\n          \n        }\n\n\n        if (numero &lt; menor) {\n          menor = numero;\n         \n        }\n    }\n  }\n\n\n  console.log(`O maior n\u00famero inserido foi: ${maior}`);\n  console.log(`O menor n\u00famero inserido foi: ${menor}`);\n\n\n&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n\n\n\n\nCALCULAR \u00c1REA\n\nfunction calcularTinta( altura, largura, rendimento){\n\n    \/\/CALCULAR A AREA\n    const area = altura * largura;\n\n    const quantidadeTinta = area \/ rendimento;\n\n    return quantidadeTinta;\n\n}\n\nconst alturaParede = 2.5;\n\nconst larguraParede = 3.0;\n\nconst rendimentoTinta = 10;\n\nconst totalTinta = calcularTinta(alturaParede, larguraParede, rendimentoTinta );\n\nconsole.log(\"Total de tinta necess\u00e1ria: \" + totalTinta.toFixed(2) + \" litros \");\n\n\n\n\nFATORIAL\n\nfunction calcularFatorial(n){\n\n    let fatorial = 1; \n\n    for( let i = 1; i &lt;= n; i++ ){\n\n       \/\/ fatorial = fatorial * i ;\n       fatorial *= i;\n\n    }\n    return fatorial;\n\n}\n\nlet numero = 5 \n\nconsole.log(\" O fatorial de \" +  numero  + \"  \u00e9 :  \" +   calcularFatorial(numero) );\n\n\nFATORIAL RECURSIVO\n\nfunction fatorialRecursivo(n){\n\n    if( n === 0 || n === 1){\n\n        return 1;\n\n    }else{\n        return n * fatorialRecursivo(n - 1); \n    }\n\n}\nlet numero = 5;\n\nconsole.log(\" O gatorial de \" +\n     numero + \" \u00e9: \" + fatorialRecursivo(numero));\n\t \n\t \n\t \nFIBONACCI\n\t \n\t \/\/ 0 1 1 2 3 5 8 13 21 \n\nlet n = 7;\n\nlet a = 0, b = 1,  proximoNumero;\n\nconsole.log(a);\nconsole.log(b);\n\nfor(let i = 2; i &lt; n; i ++ ){\n\n    proximoNumero = a + b;\n    console.log(proximoNumero);\n\n    a = b;\n    b = proximoNumero\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"321\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png\" alt=\"\" class=\"wp-image-162\" style=\"width:134px;height:auto\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png 1000w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-300x96.png 300w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-768x247.png 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/V89811082M?dp=1\">https:\/\/go.hotmart.com\/V89811082M?dp=1<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/X90111663X?dp=1\">https:\/\/go.hotmart.com\/X90111663X?dp=1<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>HOR\u00c1RIO DAS LIVES<\/strong><\/p>\n\n\n\n<p>Domingo e Segunda \u00e0s 19:00hs<\/p>\n\n\n\n<p>Quarta \u00e0s 18:00hs<\/p>\n\n\n\n<p>Quinta e Sexta \u00e0s 9:30hs<\/p>\n\n\n\n<p> S\u00e1bado \u00e0s 20:00hs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ol\u00e1 Pessoal! Na Live do dia 16\/10\/2024 praticamos l\u00f3gica de programa\u00e7\u00e3o com JavaScript. https:\/\/go.hotmart.com\/V89811082M?dp=1 https:\/\/go.hotmart.com\/X90111663X?dp=1 HOR\u00c1RIO DAS LIVES Domingo e Segunda \u00e0s 19:00hs Quarta \u00e0s 18:00hs Quinta e Sexta \u00e0s 9:30hs S\u00e1bado \u00e0s 20:00hs<\/p>\n","protected":false},"author":1,"featured_media":1097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1498"}],"collection":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1498"}],"version-history":[{"count":2,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions"}],"predecessor-version":[{"id":1500,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions\/1500"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/media\/1097"}],"wp:attachment":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}