{"id":7255,"date":"2018-11-30T07:07:33","date_gmt":"2018-11-30T12:07:33","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/ccpg1001\/?p=7255"},"modified":"2026-04-05T06:55:30","modified_gmt":"2026-04-05T11:55:30","slug":"1eva2018tii_t1-prueba-de-escritorio","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-1eva20\/1eva2018tii_t1-prueba-de-escritorio\/","title":{"rendered":"1Eva2018TII_T1 Prueba de escritorio, listas"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1ra Evaluaci\u00f3n II T\u00e9rmino 2018-2019, Noviembre 23, 2018. CCPG001<\/h2>\n\n\n\n<p><strong>Tema 1<\/strong>. (20 puntos)<\/p>\n\n\n\n<p>a. (10 puntos) \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lista = &#091;89, 45, 23, 17, 55, 95, 13, 41, 28, 11]\n\nlista.sort()\npromedio = <span style=\"color: #ff00ff\">sum<\/span>(lista)\/\/<span style=\"color: #ff00ff\">len<\/span>(lista)\n\n<span style=\"color: #ff00ff\">print<\/span>(promedio)\n\nmenores = &#091;]\ni = 0\n<span style=\"color: #d35400\">while<\/span> lista&#091;i] &lt; promedio:\n    menores.append(lista&#091;i])\n    i += 1\n\n<span style=\"color: #ff00ff\">print<\/span>(menores)<\/code><\/pre>\n\n\n\n<p>b. (10 puntos) \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pal = <span style=\"color: #008000\">'Se van en sus naves'<\/span>\n\nb     = pal&#091;::-1].replace(<span style=\"color: #008000\">' '<\/span>, <span style=\"color: #008000\">''<\/span>).lower()\npal_b = pal.lower().replace(<span style=\"color: #008000\">' '<\/span>, <span style=\"color: #008000\">''<\/span>)\n\n<span style=\"color: #d35400\">if<\/span> pal_b == b:\n    <span style=\"color: #ff00ff\">print<\/span>(<span style=\"color: #008000\">'Es pal\u00edndromo'<\/span>)\n<span style=\"color: #d35400\">else<\/span>:\n    <span style=\"color: #ff00ff\">print<\/span>(<span style=\"color: #008000\">'No es pal\u00edndromo'<\/span>)<\/code><\/pre>\n\n\n\n<p><em><strong>Nota<\/strong><\/em>: Asuma que este tema NO tienen errores de compilaci\u00f3n. Si usted cree que hay alg\u00fan error de compilaci\u00f3n, cons\u00faltelo inmediatamente con su profesor<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1ra Evaluaci\u00f3n II T\u00e9rmino 2018-2019, Noviembre 23, 2018. CCPG001 Tema 1. (20 puntos) a. (10 puntos) \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta b. (10 puntos) \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta Nota: Asuma que este tema NO tienen errores de compilaci\u00f3n. Si usted cree que hay alg\u00fan error de compilaci\u00f3n, cons\u00faltelo [&hellip;]<\/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-7255","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\/7255","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=7255"}],"version-history":[{"count":2,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/7255\/revisions"}],"predecessor-version":[{"id":16663,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/7255\/revisions\/16663"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=7255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=7255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=7255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}