2da Evaluación II Término 2018-2019. 2-Febrero-2019 /CCPG001
Sección 5. BONO (+10 PUNTOS)
¿Qué resultado muestra el siguiente código? Justifique su respuesta
import numpy as np
M = np.ones((20,17), int)
M1 = M[5:14,7:15]
M2 = M[1:9,8:]
f,c = M2.shape
if M1.size == f*c:
M[5:14,7:15] = 0
else:
M[1:9,8:] = -1
print(M.sum())