{"id":4447,"date":"2017-12-04T09:46:39","date_gmt":"2017-12-04T14:46:39","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/icm00794\/?p=4447"},"modified":"2026-04-05T06:54:58","modified_gmt":"2026-04-05T11:54:58","slug":"1eva2017tii_t4-prueba-de-escritorio","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-1eva20\/1eva2017tii_t4-prueba-de-escritorio\/","title":{"rendered":"1Eva2017TII_T4 Prueba de escritorio, listas"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1ra Evaluaci\u00f3n II T\u00e9rmino 2017-2018, Diciembre 1, 2017. CCPG001<\/h2>\n\n\n\n<p><strong>Tema 4<\/strong>. (10 puntos)<br>1. Indique la salida por pantalla del siguiente c\u00f3digo. Justifique su respuesta.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>f = &#091;<span style=\"color: #008000\">'a'<\/span>, <span style=\"color: #008000\">'c'<\/span>, <span style=\"color: #008000\">'z'<\/span>, <span style=\"color: #008000\">'m'<\/span>, <span style=\"color: #008000\">'k'<\/span>]\ng = &#091;3,4,5,6,5,7]\nt = <span style=\"color: #008000\">''<\/span>\n\n<span style=\"color: #d35400\">for<\/span> c <span style=\"color: #d35400\">in<\/span> f:\n    a = f.index(c)\n    b = g&#091;:a]\n    t = t + (c*<span style=\"color: #ff00ff\">len<\/span>(b))\n    \n<span style=\"color: #ff00ff\">print<\/span>(t)<\/code><\/pre>\n\n\n\n<p>2. Indique la salida por pantalla del siguiente c\u00f3digo. Justifique su respuesta.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color: #d35400\">import<\/span> numpy <span style=\"color: #d35400\">as<\/span> np\n\nvector = np.array(&#091;1,5,6,6,5,2,1,3,7,9,0,0,1,4,8])\n\n<span style=\"color: #ff00ff\">print<\/span>(np.unique(vector&#091;vector%2==0]).size)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<pre class=\"wp-block-code\"><code>a = vector&#091;vector%2==0]\nb = np.unique(a)\n\n<span style=\"color: #ff00ff\">print<\/span>(a)\n<span style=\"color: #ff00ff\">print<\/span>(b)\n<span style=\"color: #ff00ff\">print<\/span>(b.size)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1ra Evaluaci\u00f3n II T\u00e9rmino 2017-2018, Diciembre 1, 2017. CCPG001 Tema 4. (10 puntos)1. Indique la salida por pantalla del siguiente c\u00f3digo. Justifique su respuesta. 2. Indique la salida por pantalla del siguiente c\u00f3digo. Justifique su respuesta.<\/p>\n","protected":false},"author":8043,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"wp-custom-template-entrada-fp-ejercicios","format":"standard","meta":{"footnotes":""},"categories":[115],"tags":[161],"class_list":["post-4447","post","type-post","status-publish","format-standard","hentry","category-fp-1eva20","tag-pruebaescritorio"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/4447","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=4447"}],"version-history":[{"count":2,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/4447\/revisions"}],"predecessor-version":[{"id":16654,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/4447\/revisions\/16654"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=4447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=4447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=4447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}