{"id":1633,"date":"2014-05-13T17:25:28","date_gmt":"2014-05-13T22:25:28","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/icm00794\/?p=1633"},"modified":"2026-04-05T18:42:21","modified_gmt":"2026-04-05T23:42:21","slug":"s3eva2013tii_t4-gestionar-asientos-en-cine","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-s3eva20\/s3eva2013tii_t4-gestionar-asientos-en-cine\/","title":{"rendered":"s3Eva2013TII_T4 Gestionar asientos en cine"},"content":{"rendered":"\n<p><em><strong>Ejercicio<\/strong><\/em>: <a href=\"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-3eva20\/3eva2013tii_t4-gestionar-asientos-en-cine\/\" data-type=\"post\" data-id=\"2661\">3Eva2013TII_T4 Gestionar asientos en cine<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Algoritmo en Python<\/h2>\n\n\n\n<p>Propuesta de soluci\u00f3n en <strong>Python<\/strong>:<\/p>\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# 3Eva_IIT2013_T4 Gestionar asientos en cine\nimport numpy as np\n\n# Genera la sala\nn = int(input('numero filas: '))\nm = int(input('numero columnas:'))\nasiento = np.zeros(shape=(n,m), dtype=int)\n\nopcion = '0'\nwhile not(opcion=='5'):\n    print(' 1. Vender Boletos')\n    print(' 2._Mostrar_asientos')\n    print(' 3. Contar vendidos')\n    print(' 4. Buscar libre')\n    print(' 5. Salir ')\n\n    opcion = input('cual opcion: ')\n\n    if (opcion=='1'):\n        print('Vender Boletos')\n        fila = int(input('fila:'))\n        columna = int(input('columna:'))\n        if (asiento&#x5B;fila,columna]==0):\n            asiento&#x5B;fila,columna] = 1\n        else:\n            print('asiento ocupado')\n\n        \n    if (opcion=='2'):\n        print('Mostrar_asientos')\n        print(asiento)\n        \n    if (opcion=='3'):\n        print('Contar vendidos')\n        contar = 0\n        for fila in range(0,n,1):\n            for columna in range(0,m,1):\n                contar = contar+asiento&#x5B;fila,columna]\n        print(contar)\n        \n    if (opcion=='4'):\n        print('Buscar libre')\n        \n    if (opcion=='5'):\n        print('Salir')\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Ejercicio: 3Eva2013TII_T4 Gestionar asientos en cine Algoritmo en Python Propuesta de soluci\u00f3n en Python:<\/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":[143],"tags":[58,157],"class_list":["post-1633","post","type-post","status-publish","format-standard","hentry","category-fp-s3eva20","tag-ejemplos-python","tag-fundamentos-programacion"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/1633","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=1633"}],"version-history":[{"count":4,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/1633\/revisions"}],"predecessor-version":[{"id":23786,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/1633\/revisions\/23786"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=1633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=1633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=1633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}