Exemple #1
0
 def test_true_poly_2(self):
     self.assertEqual(poly2str(diff(read_poly('x'))), '1')
Exemple #2
0
 def test_true_poly_10(self):
     self.assertEqual(poly2str(diff(read_poly('10x+1-x^2'))), '-2x+10')
Exemple #3
0
 def test_true_poly_1(self):
     self.assertEqual(poly2str(diff(read_poly('10x^4+10x^6+6x'))),
                      '60x^5+40x^3+6')
Exemple #4
0
 def test_true_poly_8(self):
     self.assertEqual(poly2str(diff(read_poly('-x'))), '-1')
Exemple #5
0
 def test_true_poly_9(self):
     self.assertEqual(poly2str(diff(read_poly('x^10-x+x^11'))),
                      '11x^10+10x^9-1')
Exemple #6
0
 def test_true_poly_6(self):
     self.assertEqual(poly2str(diff(read_poly('1+x^9+x^10'))), '10x^9+9x^8')
Exemple #7
0
 def test_true_poly_5(self):
     self.assertEqual(poly2str(diff(read_poly('10x^155-x'))), '1550x^154-1')
Exemple #8
0
 def test_true_poly_4(self):
     self.assertEqual(poly2str(diff(read_poly('x^5-x^4-x^2'))),
                      '5x^4-4x^3-2x')
Exemple #9
0
 def test_true_poly_3(self):
     self.assertEqual(poly2str(diff(read_poly('x^2'))), '2x')
Exemple #10
0
from HW4.task2.poly_logic import read_poly, diff, poly2str

s = input("Введите полином")
polynom = read_poly(s)
print("Производная полинома:", poly2str(diff(polynom)))