Exemple #1
0
 def test_decimal_to_ex_number0(self):
     number = Convert(5)
     self.assertEqual(number, 5)
Exemple #2
0
 def test_decimal_to_ex_number1(self):
     number = Convert(10)
     self.assertEqual(number, 'A')
Exemple #3
0
 def test_decimal_to_ex_number5(self):
     number = Convert(-1)
     self.assertEqual(number, 0)
Exemple #4
0
 def test_decimal_to_ex_number4(self):
     number = Convert(1234)
     self.assertEqual(number, '4D2')
Exemple #5
0
 def test_decimal_to_ex_number3(self):
     number = Convert(4095)
     self.assertEqual(number, 'FFF')
Exemple #6
0
 def test_decimal_to_ex_number2(self):
     number = Convert(12)
     self.assertEqual(number, 'C')
def decimal(n):
    try:
        t=int(n)
        return Convert(t)
    except:
        return "Disculpe,solo acepto numeros"