Пример #1
0
	def test_sqrt_non_negative_arg(self):
		self.assertEqual(lib.sqrt(9), 3)
		self.assertEqual(lib.sqrt(1), 1)
		self.assertEqual(lib.sqrt(0), 0)
Пример #2
0
 def test_sqrt_3(self):
     self.assertEqual(lib.sqrt(-35),0) 
Пример #3
0
 def test_sqrt(self):
     self.assertEqual(lib.sqrt(0),0)
     self.assertEqual(lib.sqrt(36),6) 
     self.assertEqual(lib.sqrt(35),35**0.5)
Пример #4
0
 def test3(self):
     self.assertEqual(lib.sqrt(-1), 0)
Пример #5
0
 def test_sqrt_negative(self):
     # Набор проверок
     self.assertEqual(lib.sqrt(0), 0)
Пример #6
0
 def test_sqrt_negative(self):
     # Набор проверок
     self.assertEqual(lib.sqrt(-1), 0)
Пример #7
0
def smallest_prime_factor(n):
    assert n >= 2
    for i in range(2, lib.sqrt(n) + 1):
        if n % i == 0:
            return i
    return n
Пример #8
0
 def test_sqrtotr(self):
     self.assertEqual(lib.sqrt(-1), 0)
Пример #9
0
 def test_sqrt(self):
     self.assertEqual(lib.sqrt(4),2)
     self.assertEqual(lib.sqrt(16),4)
     self.assertNotEqual(lib.sqrt(540),10)
     self.assertNotEqual(lib.sqrt(64),7)
Пример #10
0
	def test_sqrt(self):
		self.assertEqual(lib.sqrt(9), 3)
		self.assertEqual(lib.sqrt(0), 0)
		self.assertEqual(lib.sqrt(121), 11)
Пример #11
0
 def test_sqrtpol(self):
     self.assertEqual(lib.sqrt(9), 3)
     self.assertEqual(lib.sqrt(1), 1)
     self.assertEqual(lib.sqrt(0), 0)
Пример #12
0
 def test_sqrt_negativ(self):
     self.assertEqual(lib.sqrt(-12), 0)
     self.assertEqual(lib.sqrt(-3), 0)
     self.assertEqual(lib.sqrt(-4), 0)
Пример #13
0
 def test_sqrt(self):
     self.assertEqual(lib.sqrt(144), 12)
     self.assertEqual(lib.sqrt(0), 0)
     self.assertEqual(lib.sqrt(121), 11)
     self.assertEqual(lib.sqrt(25), 5)
Пример #14
0
 def test_factorial_negative(self):
     self.assertEqual(lib.sqrt(-1),0)
Пример #15
0
	def test_sqrt_negative(self):
		self.assertEqual(lib.sqrt(-1), 0)
Пример #16
0
 def test1(self):
     self.assertEqual(lib.sqrt(0), 0)
Пример #17
0
 def even(self):
     self.assertEqual(lib.even(2), 'chetnoe')
     self.assertEqual(lib.sqrt(1), 'nechetnoe')
     self.assertEqual(lib.sqrt(0), '')
Пример #18
0
 def test2(self):
     self.assertEqual(lib.sqrt(1), 1)
Пример #19
0
 def test_sqrt_non_negative_arg(self):
     # Набор проверок
     self.assertEqual(lib.sqrt(9), 3)
     self.assertEqual(lib.sqrt(1), 1)
     self.assertEqual(lib.sqrt(0), 0)
Пример #20
0
	def test_sqrt_Positive(self):
		self.assertEqual(lib.sqrt(9), 3)
		self.assertEqual(lib.sqrt(1), 1)
		self.assertEqual(lib.sqrt(0), 0)