#Тема 4 <Анисенков Павел Дмитриевич> Python 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)] on win32 Enter "help" below or click "Help" above for more information. help(round) Help on built-in function round in module builtins: round(number, ndigits=None) Round a number to a given precision in decimal digits. The return value is an integer if ndigits is omitted or None. Otherwise the return value has the same type as the number. ndigits may be negative. round(123.456,1) 123.5 round(123.456,0) 123.0 type(round(123.456,0)) type(round(123.456,1\)) SyntaxError: unexpected character after line continuation character type(round(123.456,1)) type(round(123.456,)) len(123) Traceback (most recent call last): File "", line 1, in len(123) TypeError: object of type 'int' has no len() len('hello') 5 import pylab imp ort sys SyntaxError: invalid syntax import sys x=list(range(-3,55,4)) =list(range(15)) SyntaxError: invalid syntax t=list(range(15)) pylab.plot(t,x) [] pylab.title('Первый график') Text(0.5, 1.0, 'Первый график') pylab.xlabel('время') SyntaxError: unexpected indent pylab.xlabel('время') Text(0.5, 0, 'время') pylab.ylabel('сигнал') Text(0, 0.5, 'сигнал') pylab.show() #Отображение графика на экране ывав X1=[12,6,8,10,7] X2=[5,7,9,11,13] pylab.plot(X1) [] pylab.plot(X2) [] pylab.show() region=['Центр','Урал','Сибирь','Юг'] naselen=[65,12,23,17] pylab.pie(naselen,labels=region) ([, , , ], [Text(-0.191013134139045, 1.0832885038559115, 'Центр'), Text(-0.861328292412156, -0.6841882582231001, 'Урал'), Text(0.04429273995539947, -1.0991078896938387, 'Сибирь'), Text(0.9873750693480946, -0.48486129194837324, 'Юг')]) pylab.show() #Отображение диаграммы data = [1, 2, 3, 3, 2, 3, 3, 3, 2] pylab.hist(data, bins=3) (array([1., 3., 5.]), array([1. , 1.66666667, 2.33333333, 3. ]), ) SyntaxError: multiple statements found while compiling a single statement pylab.hist(data, bins=3) (array([1., 3., 5.]), array([1. , 1.66666667, 2.33333333, 3. ]), ) pylab.title("Гистограмма") Text(0.5, 1.0, 'Гистограмма') Text(0.5, 1.0, 'Гистограмма') Traceback (most recent call last): File "", line 1, in Text(0.5, 1.0, 'Гистограмма') NameError: name 'Text' is not defined. Did you mean: 'next'? pylab.show() c = ['A', 'B', 'C', 'D'] v = [25, 40, 30, 50] pylab.bar(c, v) pylab.title("Столбиковая диаграмма") Text(0.5, 1.0, 'Столбиковая диаграмма') pylab.show()