Posts by Paulo Smith • 3 points
2 posts
-
0
votes1
answer86
viewsQ: How to sort elements from a list using Selection Sort?
I implemented Selection Sort to sort the text of a . txt that I made into a list. The problem is that it only orders field 1 and field 3, field 2 it did not order, as seen in the output: 10, 100, 2,…
-
0
votes2
answers370
viewsQ: How to verify which numbers of a matrix are primes?
My code so far def numerosPrimos(matrix): lista_primos = [] for i in range(len(matrix)): for a in range(len(matrix[i])): if matrix[i][a] > 1: for c in range(2,matrix[i][a]): if matrix[i][a] % c…
pythonasked Paulo Smith 3