{"id":4336,"date":"2017-09-19T22:16:12","date_gmt":"2017-09-20T03:16:12","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/icm00794\/?p=4336"},"modified":"2026-04-05T07:26:27","modified_gmt":"2026-04-05T12:26:27","slug":"3eva2017ti_t3-prueba-de-escritorio","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-3eva20\/3eva2017ti_t3-prueba-de-escritorio\/","title":{"rendered":"3Eva2017TI_T3 Prueba de escritorio \u2013 cadenas, listas, \u00edndices"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">3ra Evaluaci\u00f3n I T\u00e9rmino 2017-2018. Septiembre 16, 2017 \/CCPG001<\/h2>\n\n\n\n<p><strong>TEMA 3<\/strong> (10 PUNTOS)<\/p>\n\n\n\n<p>a. [5 puntos] \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a = <span style=\"color: #008000\">'mensaje'<\/span>\nc = <span style=\"color: #008000\">'abcdefg'<\/span>\n\ni = <span style=\"color: #ff00ff\">len<\/span>(c)-1\n<span style=\"color: #d35400\">for<\/span> b  <span style=\"color: #d35400\">in<\/span> a:\n    <span style=\"color: #ff00ff\">print<\/span>(b*c.index(c&#091;i]))\n    i -= 1<\/code><\/pre>\n\n\n\n<p>b. [5 puntos] \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>L = &#091;5,3,8,2,7]\n\nA = &#091;0]*10\nindice = 3\n<span style=\"color: #d35400\">for<\/span> valor <span style=\"color: #d35400\">in<\/span> L:\n    <span style=\"color: #d35400\">if<\/span> valor &lt; 6:\n        indice -= 1\n    <span style=\"color: #d35400\">else<\/span>:\n        indice += 1\n    A&#091;indice] = valor\n\n<span style=\"color: #ff00ff\">print<\/span>(<span style=\"color: #ff00ff\">set<\/span>(A))<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>3ra Evaluaci\u00f3n I T\u00e9rmino 2017-2018. Septiembre 16, 2017 \/CCPG001 TEMA 3 (10 PUNTOS) a. [5 puntos] \u00bfQu\u00e9 imprime el siguiente c\u00f3digo? Justifique su respuesta. b. [5 puntos] \u00bfQu\u00e9 imprime el 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":[122],"tags":[161],"class_list":["post-4336","post","type-post","status-publish","format-standard","hentry","category-fp-3eva20","tag-pruebaescritorio"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/4336","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=4336"}],"version-history":[{"count":3,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/4336\/revisions"}],"predecessor-version":[{"id":16997,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/4336\/revisions\/16997"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=4336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=4336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=4336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}