{"id":506,"date":"2025-08-22T18:32:31","date_gmt":"2025-08-22T18:32:31","guid":{"rendered":"https:\/\/hmoweb.net\/Python\/?p=506"},"modified":"2025-08-30T17:37:46","modified_gmt":"2025-08-30T17:37:46","slug":"ejercicio-15-importaciones","status":"publish","type":"post","link":"https:\/\/hmoweb.net\/Python\/2025\/08\/22\/ejercicio-15-importaciones\/","title":{"rendered":"Ejercicio 15 Importaciones"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Es recomendable que este ejercicio lo escribas por partes y lo revises para ver que se obtiene el resultado esperado. Este ejercicio lo podr\u00e1s seguir en el video <a href=\"https:\/\/youtu.be\/DLikpfc64cA?si=0L72-SeJgpO8UH4l&amp;t=14128s\" target=\"_blank\" rel=\"noreferrer noopener\">Aprender Python<\/a> en el minuto [3:55:28].<\/p>\n\n\n\n<a href=\"https:\/\/youtu.be\/DLikpfc64cA?si=7NvurLMnWqAcr0KJ&#038;t=14128s\" target=\"_blank\">\n  Ver video desde el minuto 3:55:28\n<\/a>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&quot;&quot;&quot;\nEjercicio # 15 Importacion\n22\/08\/2025\nEdito AHR\n&quot;&quot;&quot;\n\nprint(&quot;\\nActividad 1&quot;)\nprint(&quot;import &lt;modulo&gt;&quot;)\nprint(&quot;&lt;modulo&gt;.&lt;funcion&gt;(&lt;args&gt;)&quot;)\n\nimport math\nprint(math.pow(9, 2))\n\nprint(&quot;\\nActividad 2&quot;)\nprint(&quot;&lt;modulo&gt;.&lt;constante&gt;&quot;)\n\nimport math\nprint(math.pi)\n\nprint(&quot;\\nActividad 3&quot;)\nprint(&quot;import &lt;modulo&gt; as &lt;nombre_alternativo&gt;&quot;)\nprint(&quot;&lt;nombre_alternativo&gt;.&lt;funcion&gt;(&lt;args&gt;)&quot;)\nprint(&quot;&lt;nombre_alternativo&gt;.&lt;constante&gt;&quot;)\nimport math as matematicas\nprint(matematicas.pow(9, 2))\nprint(matematicas.pi)\n\nprint(&quot;\\nActividad 4&quot;)\nprint(&quot;from &lt;modulo&gt; import &lt;elemento&gt;&quot;)\nfrom math import pow\nprint(pow(9, 2))\n\nprint(&quot;\\nActividad 5&quot;)\nprint(&quot;from &lt;modulo&gt; import *&quot;) # No se recomienda\nfrom math import *\nprint(pow(9, 3))\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">A continuaci\u00f3n, corre el programa desde el men\u00fa Run\/Run Module (o bien con la tecla &#8216;F5&#8217;), te muestro el resultado en la consola (Shell):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>= RESTART: C:\/Users\/Codigo\/Ejercicio 15 Importacion.py\n\nActividad 1\nimport &lt;modulo&gt;\n&lt;modulo&gt;.&lt;funcion&gt;(&lt;args&gt;)\n81.0\n\nActividad 2\n&lt;modulo&gt;.&lt;constante&gt;\n3.141592653589793\n\nActividad 3\nimport &lt;modulo&gt; as &lt;nombre_alternativo&gt;\n&lt;nombre_alternativo&gt;.&lt;funcion&gt;(&lt;args&gt;)\n&lt;nombre_alternativo&gt;.&lt;constante&gt;\n81.0\n3.141592653589793\n\nActividad 4\nfrom &lt;modulo&gt; import &lt;elemento&gt;\n81.0\n\nActividad 5\nfrom &lt;modulo&gt; import *\n729.0<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Es recomendable que este ejercicio lo escribas por partes y lo revises para ver que se obtiene el resultado esperado. Este ejercicio lo podr\u00e1s seguir en el video Aprender Python en el minuto [3:55:28]. Ver video desde el minuto 3:55:28 A continuaci\u00f3n, corre el programa desde el men\u00fa Run\/Run Module (o bien con la tecla &#8230; <a title=\"Ejercicio 15 Importaciones\" class=\"read-more\" href=\"https:\/\/hmoweb.net\/Python\/2025\/08\/22\/ejercicio-15-importaciones\/\" aria-label=\"Leer m\u00e1s sobre Ejercicio 15 Importaciones\">Leer m\u00e1s<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"pagelayer_contact_templates":[],"_pagelayer_content":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-506","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/comments?post=506"}],"version-history":[{"count":5,"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":673,"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/posts\/506\/revisions\/673"}],"wp:attachment":[{"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/media?parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/categories?post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hmoweb.net\/Python\/wp-json\/wp\/v2\/tags?post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}