@@ -0,0 +1,855 @@
+def bubble_sort(valor):%0A    '''%0A    Tempo: O(n%5E2)%0A    Memoria: O(1)%0A    '''%0A    tam = len(valor)-1%0A    for cont in range(tam):%0A        if valor == sorted(valor):%0A            return valor%0A        for cont2 in range(tam):%0A            if valor%5Bcont2%5D%3Evalor%5Bcont2+1%5D: valor%5Bcont2%5D, valor%5Bcont2+1%5D=valor%5Bcont2+1%5D, valor%5Bcont2%5D%0A    return valor%0A%0Aimport unittest%0Aclass OrdenacaoTestes(unittest.TestCase):%0A    def teste_lista_vazia(self):%0A        self.assertListEqual(%5B%5D, bubble_sort(%5B%5D))%0A%0A    def teste_lista_unitaria(self):%0A        self.assertListEqual(%5B1%5D, bubble_sort(%5B1%5D))%0A%0A    def teste_lista_binaria(self):%0A        self.assertListEqual(%5B1, 2%5D, bubble_sort(%5B1, 2%5D))%0A%0A    def teste_lista_binaria(self):%0A        self.assertListEqual(%5B0, 1, 2, 3, 4, 5, 6, 7, 8, 9%5D, bubble_sort(%5B9, 7, 1, 8, 5, 3, 6, 4, 2, 0%5D))%0A%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

Create bubblesort.py