numeros aleatorios





import numpy as np
import random as rn
var=int(input("Inserte un numero"))
sist = np.zeros ((var,var))
count = 0
for x in sist :
    for index,val in enumerate (x):
        num=rn. randint (0,10)
        x[index]=num
        if num %2==0:
            count = count + 1
print(sist)
print(count)

Share this

Related Posts

Previous
Next Post »

Buscar en Wikipedia

Resultados de la búsqueda