21 | f2 = open("answer.htm", 'w')
22 |
23 | for ind in TopList:
24 | . . f1.write(ind + '\n')
25 | for ind in TopList:
26 | . . f2.write(ind + '\n')
27 |
28 | f1.write('
29 | f2.write('
30 | tr = 0
31 | count = 1
32 |
33 | for i in range(300):
34 | . . x1 = gen_number(4)
35 | . . x2 = gen_number(7)
36 | . . b = x1 + x2
37 | . . c = x1 * x2
38 |
39 | . . if b != 0:
40 | . . . . if tr == 0:
41 | . . . . . . f1.write('
42 | . . . . . . f2.write('
43 | . . . . f1.write('
')
44 | . . . . f1.write(str(count) + ') x2 '+ show_numb(b*-1) + 'x ' +show_numb(c) + ' = 0' )
45 | . . . . f1.write('
46 | . . . . f2.write('
47 | . . . . f2.write(str(count) + ') x1 = '+ str(x1) + '; x2 = ' + str(x2) )
48 | . . . . f2.write('
49 | . . . . count += 1
50 | . . . . tr += 1
51 | . . . . if tr == 3:
52 | . . . . . . f1.write('
53 | . . . . . . f2.write('')
54 | . . . . . . tr = 0
55 |
56 | f2.write('
57 | f2.write('