{"id":1291,"date":"2014-06-15T12:55:38","date_gmt":"2014-06-15T17:55:38","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/icm00794\/?p=1291"},"modified":"2026-04-05T17:47:41","modified_gmt":"2026-04-05T22:47:41","slug":"s2eva2008tii_t3-crear-un-calendario","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-s2eva10\/s2eva2008tii_t3-crear-un-calendario\/","title":{"rendered":"s2Eva2008TII_T3 Crear un Calendario"},"content":{"rendered":"\n<p><em><strong>Ejercicio<\/strong><\/em>: <a href=\"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-2eva10\/2eva2008tii_t3-crear-un-calendario\/\" data-type=\"post\" data-id=\"2930\">2Eva2008TII_T3 Crear un Calendario<\/a><\/p>\n\n\n\n<p>Soluci\u00f3n presentada junto a video de concepto:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Matrices como Arreglos de dos dimensiones en Python\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/Mv8jK4MIQF4?start=99&feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Algoritmo en Python<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# ICM00794-Fundamentos de Computaci\u00f3n - FCNM-ESPOL\n# 2Eva_IIT2008_T3 Crear un Calendario\n# Propuesta: edelros@espol.edu.ec\n\nimport numpy as np\n\ndprimer = int(input('\u00bfd\u00eda de inicio del mes?: '))\ndiasmes = int(input('\u00bfd\u00edas del mes?: '))\n\n# El calendario vac\u00edo al inicio\ncalendario = np.zeros(shape=(6,7), dtype=int)\nc = dprimer - 1\nf = 0\ndia = 1\nwhile (f&lt;=5 and dia&lt;=diasmes):\n    while (c&lt;=6 and dia&lt;=diasmes):\n        calendario&#x5B;f,c] = dia\n        dia = dia + 1\n        c = c + 1\n    f = f + 1\n    c = 0\n\nprint('   D  L  M  M  J  V  S')\nprint(calendario)\n# Tarea: Validar primer d\u00eda del mes entre 1 y 7, \n#    y n\u00famero de d\u00edas del mes entre 28 y 31\n<\/pre><\/div>\n\n\n<p>resultado del algoritmo<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u00bfd\u00eda de inicio del mes?: 4\n\u00bfd\u00edas del mes?: 31\n   D  L  M  M  J  V  S\n&#091;&#091; 0  0  0  1  2  3  4]\n &#091; 5  6  7  8  9 10 11]\n &#091;12 13 14 15 16 17 18]\n &#091;19 20 21 22 23 24 25]\n &#091;26 27 28 29 30 31  0]\n &#091; 0  0  0  0  0  0  0]]\n&gt;&gt;&gt; <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ejercicio: 2Eva2008TII_T3 Crear un Calendario Soluci\u00f3n presentada junto a video de concepto: Algoritmo en Python resultado del algoritmo<\/p>\n","protected":false},"author":8043,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"wp-custom-template-entrada-fp-ejemplos","format":"standard","meta":{"footnotes":""},"categories":[131],"tags":[58,157],"class_list":["post-1291","post","type-post","status-publish","format-standard","hentry","category-fp-s2eva10","tag-ejemplos-python","tag-fundamentos-programacion"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/1291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/users\/8043"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/comments?post=1291"}],"version-history":[{"count":4,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/1291\/revisions"}],"predecessor-version":[{"id":23642,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/1291\/revisions\/23642"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=1291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=1291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=1291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}