{"id":7276,"date":"2014-07-02T12:55:28","date_gmt":"2014-07-02T17:55:28","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/ccpg1001\/?p=7276"},"modified":"2026-04-05T17:45:23","modified_gmt":"2026-04-05T22:45:23","slug":"s2eva2010tii_t3-validar-registro-de-revocatoria-en-cne","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-s2eva10\/s2eva2010tii_t3-validar-registro-de-revocatoria-en-cne\/","title":{"rendered":"s2Eva2010TII_T3 Validar registro de revocatoria en CNE"},"content":{"rendered":"\n<p><em><strong>Ejercicio<\/strong><\/em>: <a href=\"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-2eva10\/2eva2010tii_t3-validar-registro-de-revocatoria-en-cne\/\" data-type=\"post\" data-id=\"2963\">2Eva2010TII_T3 Validar registro de revocatoria en CNE<\/a><\/p>\n\n\n\n<p>propuesta de soluci\u00f3n en Python, contiene tarea.<\/p>\n\n\n\n<p>Ejemplo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cuantos ciudadanos en padr\u00f3n: 5\nc\u00e9dula : 3\nc\u00e9dula : 2\nc\u00e9dula : 1\nc\u00e9dula : 4\nc\u00e9dula : 5\ncuantos se quejan: 3\ncedula: 2\ncedula: 2\ncedula: 3\nlos que si votan son: 2\n&#091;2 3]\n&gt;&gt;&gt; <\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\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_IIT2010_T3 Validar registro de revocatoria en CNE\n# Tema 2. Mostrar valores \u00fanicos en vector\n# Tema 3. Validar registro de revocatoria en CNE\n\nimport numpy as np\n\ndef unicos(vector):\n    n = len(vector)\n    vale = np.ones(n, dtype= int)\n    i = 0\n    while not(i&gt;=(n-1)): #penultimo\n        j = i + 1\n        while not(j&gt;=n): # ultimo\n            if (vector&#x5B;i] == vector&#x5B;j]):\n                vale&#x5B;j] = 0\n            j = j + 1\n        i = i + 1\n\n    # obtiene los \u00fanicos\n    sinrepetir =&#x5B;]\n    i = 0\n    while not(i&gt;=n):\n        if (vale&#x5B;i] == 1):\n            sinrepetir.append(vector&#x5B;i])\n        i= i+1\n    sinrepetir = np.array(sinrepetir)\n    return(sinrepetir)\n\ndef registrados(padron,unicos):\n    n = len(padron)\n    m = len(unicos)\n\n    vale = np.ones(m,dtype=int)\n    sivotan = &#x5B;]\n    i = 0\n    while not(i&gt;=m):\n        if not(unicos&#x5B;i] in padron):\n            vale&#x5B;i] = 0\n        if (unicos&#x5B;i] in padron):\n            sivotan.append(unicos&#x5B;i])\n        i = i+1\n    sivotan = np.array(sivotan)\n    return(sivotan)\n\n# PROGRAMA QUE USA LAS FUNCIONES\n\n# INGRESO\nn = int(input('cuantos ciudadanos en padr\u00f3n: '))\npadron = &#x5B;]\ni = 0\nwhile not(i&gt;=n):\n    cedula = int(input('c\u00e9dula : '))\n    padron.append(cedula)\n    i = i + 1\n\nm = int(input('cuantos se quejan: '))\nsequejan =&#x5B;]\nj = 0\nwhile not(j&gt;=m):\n    cedula = int(input('cedula: '))\n    sequejan.append(cedula)\n    j = j + 1\n\n# PROCEDIMIENTO\nsinrepetir = unicos(sequejan)\nsivotan = registrados(padron,sinrepetir)\nk = len(sivotan)\n\n# Tarea: Verificar si llegan al 10% del padr\u00f3n\n\n# SALIDA\nprint('los que si votan son:',k)\nprint(sivotan)\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Ejercicio: 2Eva2010TII_T3 Validar registro de revocatoria en CNE propuesta de soluci\u00f3n en Python, contiene tarea. Ejemplo: Algoritmo 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":[131],"tags":[58,157],"class_list":["post-7276","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\/7276","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=7276"}],"version-history":[{"count":4,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/7276\/revisions"}],"predecessor-version":[{"id":23633,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/7276\/revisions\/23633"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=7276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=7276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=7276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}