dimanche 2 août 2015

2 randomly generated lists of fixed length that multiply all elements between them - Python

So i have an exercise that basically wants python to generate two lists of fixed length with digits from 0-20. Then it needs to multiply each element of the first list with the second list ( i.e. a[1]*b[1] , a[2]*b[2] and so on) and print the result with the exception that if the same result exist more than once, it is only printed once.Like if we have 2*2 and 1*4, then the number 4 will only appear once.




Aucun commentaire:

Enregistrer un commentaire