Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168730
Image: ubuntu2004
ЗАВДАННЯ 2

ДЛЯ ПРАВИЛЬНОГО ВИКОНАННЯ ПРИКЛАДІВ НЕОБХІДНО ВИПРАВИТИ ПОМИЛКИ, ДОПУЩЕНІ У ПРОГРАМНИХ КОДАХ!

№2.2.1. Обчислити (5)|-(-5)|.
|-(-5)|
Syntax Error: |-(-5)|
№2.2.2. Обчислити значення тригонометричних функцій: sin2\sin2, sin2π\sin^{2}{π}, sinπ\sin{π}, cosπ4\cos \frac{π}{4}, tgπtg{π}, ctgπ2ctg \frac{π}{2}.
sin2
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/10.py", line 6, in <module> exec compile(ur'sin2' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> NameError: name 'sin2' is not defined
sin^2(pi)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/11.py", line 6, in <module> exec compile(ur'sin**Integer(2)(pi)' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> TypeError: 'sage.rings.integer.Integer' object is not callable
Sin(pi)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/12.py", line 6, in <module> exec compile(ur'Sin(pi)' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> NameError: name 'Sin' is not defined
cos(Pi/4)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/13.py", line 6, in <module> exec compile(ur'cos(Pi/Integer(4))' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> NameError: name 'Pi' is not defined
tg(pi)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/27.py", line 6, in <module> exec compile(ur'tg(pi)' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> NameError: name 'tg' is not defined
ctg(pi/2)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/1.py", line 6, in <module> exec compile(ur'ctg(pi/Integer(2))' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> NameError: name 'ctg' is not defined
№2.2.3. Вивести числове значення константи π{π}.
pi
\pi
№2.2.4. Обчислити 5!5! (факторіал числа 5).
n=5 n!
Syntax Error: n!
№2.2.5. Обчислити значення виразу a+ba+b, якщо:
а) a=3a=3 та b=5b=5;
б) a=2a=2 та b=5,7b=5,7.
a=3 b=5 a+b
Syntax Error: a=3 b=5
a=2 b=5,7 a+b
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/notebook/sage_notebook/worksheets/admin/33/code/20.py", line 8, in <module> exec compile(ur'a+b' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 1, in <module> File "element.pyx", line 713, in sage.structure.element.ModuleElement.__add__ File "coerce.pyx", line 295, in sage.structure.coerce.CoercionModel_cache_maps.bin_op_c TypeError: unsupported operand parent(s) for '+': 'Integer Ring' and '<type 'tuple'>'
№2.2.6. Обчислити:
а) 1+1+1+2{\sqrt{1 + \sqrt{1 + \sqrt{1+\sqrt{2}}}}};
б) 132+7{\frac{ 1-\sqrt{3} }{2+\sqrt{7}}};
в) (1+5)23{\left(1 + \sqrt{5} \right)}^{\frac{2}{3}}.
(Отримані результати мають бути представлені у вигляді десяткових дробів.)
sqrt(1+sqrt(1+sqrt(1+sqrt(2))))
sqrt(sqrt(sqrt(sqrt(2) + 1) + 1) + 1)
1-sqrt(3)/2+sqrt(7)
\sqrt{ 7 } - \frac{\sqrt{ 3 }}{2} + 1
(1+sqrt(5))^2/3
\frac{{\left( \sqrt{ 5 } + 1 \right)}^{2} }{3}