{"id":5166,"date":"2018-02-15T12:35:03","date_gmt":"2018-02-15T17:35:03","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/icm00794\/?p=5166"},"modified":"2026-04-05T07:14:45","modified_gmt":"2026-04-05T12:14:45","slug":"2eva2017tii_t3-prueba-de-escritorio","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-2eva20\/2eva2017tii_t3-prueba-de-escritorio\/","title":{"rendered":"2Eva2017TII_T3 Prueba de escritorio, arreglos"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">2da Evaluaci\u00f3n II T\u00e9rmino 2017-2018. Febrero 14, 2018 \/CCPG001<\/h2>\n\n\n\n<p><strong>Tema 3<\/strong>. (10 puntos) Para las preguntas, considere matriz <strong>M<\/strong> como un arreglo (Numpy) :<\/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\nM =  np.array(&#091;&#091;<span style=\"color: #008000\">'h'<\/span>,<span style=\"color: #008000\">'o'<\/span>,<span style=\"color: #008000\">'l'<\/span>,<span style=\"color: #008000\">'a'<\/span>],\n               &#091;<span style=\"color: #008000\">'m'<\/span>,<span style=\"color: #008000\">'u'<\/span>,<span style=\"color: #008000\">'n'<\/span>,<span style=\"color: #008000\">'d'<\/span>],\n               &#091;<span style=\"color: #008000\">'o'<\/span>,<span style=\"color: #008000\">'E'<\/span>,<span style=\"color: #008000\">'S'<\/span>,<span style=\"color: #008000\">'P'<\/span>],\n               &#091;<span style=\"color: #008000\">'O'<\/span>,<span style=\"color: #008000\">'L'<\/span>,<span style=\"color: #008000\">':'<\/span>,<span style=\"color: #008000\">')'<\/span>]])<\/code><\/pre>\n\n\n\n<p>a) Indique la salida por pantalla de las siguientes instrucciones. Justifique su respuesta:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>f,c = M.shape\nt = <span style=\"color: #008000\">''<\/span>\n<span style=\"color: #d35400\">for<\/span> j <span style=\"color: #d35400\">in<\/span> <span style=\"color: #ff00ff\">range<\/span>(c):\n    t = t + <span style=\"color: #008000\">''<\/span>.join(M&#091;:,j].tolist())\n    \n<span style=\"color: #ff00ff\">print<\/span>(t)\n<\/code><\/pre>\n\n\n\n<p>b) Indique la salida por pantalla de las siguientes instrucciones. Justifique su respuesta:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color: #ff00ff\">print<\/span>((((M ==<span style=\"color: #008000\">'o'<\/span>)|(M==<span style=\"color: #008000\">'O'<\/span>)).sum(axis=0)&gt;0).sum())<\/code><\/pre>\n\n\n\n<p><em><strong>R\u00fabrica<\/strong>: cada literal 5 puntos<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2da Evaluaci\u00f3n II T\u00e9rmino 2017-2018. Febrero 14, 2018 \/CCPG001 Tema 3. (10 puntos) Para las preguntas, considere matriz M como un arreglo (Numpy) : a) Indique la salida por pantalla de las siguientes instrucciones. Justifique su respuesta: b) Indique la salida por pantalla de las siguientes instrucciones. Justifique su respuesta: R\u00fabrica: cada literal 5 puntos<\/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":[95],"tags":[161],"class_list":["post-5166","post","type-post","status-publish","format-standard","hentry","category-fp-2eva20","tag-pruebaescritorio"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/5166","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=5166"}],"version-history":[{"count":3,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/5166\/revisions"}],"predecessor-version":[{"id":16950,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/5166\/revisions\/16950"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=5166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=5166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=5166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}