Re-run Chapter 02 files with Python 3.12
This commit is contained in:
parent
8da18b8677
commit
7eed0841f1
5 changed files with 52 additions and 38 deletions
|
|
@ -127,7 +127,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<module 'math' from '/home/webartifex/.pyenv/versions/3.8.6/lib/python3.8/lib-dynload/math.cpython-38-x86_64-linux-gnu.so'>"
|
||||
"<module 'math' from '/usr/lib64/python3.12/lib-dynload/math.cpython-312-x86_64-linux-gnu.so'>"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
|
|
@ -227,6 +227,7 @@
|
|||
" 'atan',\n",
|
||||
" 'atan2',\n",
|
||||
" 'atanh',\n",
|
||||
" 'cbrt',\n",
|
||||
" 'ceil',\n",
|
||||
" 'comb',\n",
|
||||
" 'copysign',\n",
|
||||
|
|
@ -238,6 +239,7 @@
|
|||
" 'erf',\n",
|
||||
" 'erfc',\n",
|
||||
" 'exp',\n",
|
||||
" 'exp2',\n",
|
||||
" 'expm1',\n",
|
||||
" 'fabs',\n",
|
||||
" 'factorial',\n",
|
||||
|
|
@ -254,6 +256,7 @@
|
|||
" 'isinf',\n",
|
||||
" 'isnan',\n",
|
||||
" 'isqrt',\n",
|
||||
" 'lcm',\n",
|
||||
" 'ldexp',\n",
|
||||
" 'lgamma',\n",
|
||||
" 'log',\n",
|
||||
|
|
@ -262,6 +265,7 @@
|
|||
" 'log2',\n",
|
||||
" 'modf',\n",
|
||||
" 'nan',\n",
|
||||
" 'nextafter',\n",
|
||||
" 'perm',\n",
|
||||
" 'pi',\n",
|
||||
" 'pow',\n",
|
||||
|
|
@ -271,10 +275,12 @@
|
|||
" 'sin',\n",
|
||||
" 'sinh',\n",
|
||||
" 'sqrt',\n",
|
||||
" 'sumprod',\n",
|
||||
" 'tan',\n",
|
||||
" 'tanh',\n",
|
||||
" 'tau',\n",
|
||||
" 'trunc']"
|
||||
" 'trunc',\n",
|
||||
" 'ulp']"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
|
|
@ -589,7 +595,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<module 'random' from '/home/webartifex/.pyenv/versions/3.8.6/lib/python3.8/random.py'>"
|
||||
"<module 'random' from '/usr/lib64/python3.12/random.py'>"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
|
|
@ -632,8 +638,8 @@
|
|||
" 'SG_MAGICCONST',\n",
|
||||
" 'SystemRandom',\n",
|
||||
" 'TWOPI',\n",
|
||||
" '_ONE',\n",
|
||||
" '_Sequence',\n",
|
||||
" '_Set',\n",
|
||||
" '__all__',\n",
|
||||
" '__builtins__',\n",
|
||||
" '__cached__',\n",
|
||||
|
|
@ -650,8 +656,14 @@
|
|||
" '_cos',\n",
|
||||
" '_e',\n",
|
||||
" '_exp',\n",
|
||||
" '_fabs',\n",
|
||||
" '_floor',\n",
|
||||
" '_index',\n",
|
||||
" '_inst',\n",
|
||||
" '_isfinite',\n",
|
||||
" '_lgamma',\n",
|
||||
" '_log',\n",
|
||||
" '_log2',\n",
|
||||
" '_os',\n",
|
||||
" '_pi',\n",
|
||||
" '_random',\n",
|
||||
|
|
@ -664,6 +676,7 @@
|
|||
" '_urandom',\n",
|
||||
" '_warn',\n",
|
||||
" 'betavariate',\n",
|
||||
" 'binomialvariate',\n",
|
||||
" 'choice',\n",
|
||||
" 'choices',\n",
|
||||
" 'expovariate',\n",
|
||||
|
|
@ -674,6 +687,7 @@
|
|||
" 'lognormvariate',\n",
|
||||
" 'normalvariate',\n",
|
||||
" 'paretovariate',\n",
|
||||
" 'randbytes',\n",
|
||||
" 'randint',\n",
|
||||
" 'random',\n",
|
||||
" 'randrange',\n",
|
||||
|
|
@ -1031,7 +1045,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Requirement already satisfied: numpy in /home/webartifex/repos/intro-to-python/.venv/lib/python3.8/site-packages (1.19.2)\n"
|
||||
"Requirement already satisfied: numpy in /home/alexander/Repositories/intro-to-python/.venv/lib64/python3.12/site-packages (1.26.4)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1086,7 +1100,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<module 'numpy' from '/home/webartifex/repos/intro-to-python/.venv/lib/python3.8/site-packages/numpy/__init__.py'>"
|
||||
"<module 'numpy' from '/home/alexander/Repositories/intro-to-python/.venv/lib64/python3.12/site-packages/numpy/__init__.py'>"
|
||||
]
|
||||
},
|
||||
"execution_count": 31,
|
||||
|
|
@ -1338,7 +1352,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/home/webartifex/repos/intro-to-python/02_functions\n"
|
||||
"/home/alexander/Repositories/intro-to-python/02_functions\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1384,7 +1398,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<module 'sample_module' from '/home/webartifex/repos/intro-to-python/02_functions/sample_module.py'>"
|
||||
"<module 'sample_module' from '/home/alexander/Repositories/intro-to-python/02_functions/sample_module.py'>"
|
||||
]
|
||||
},
|
||||
"execution_count": 41,
|
||||
|
|
@ -1499,12 +1513,12 @@
|
|||
"\n",
|
||||
"average_evens(numbers, *, scalar=1)\n",
|
||||
" Calculate the average of all even numbers in a list.\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" Args:\n",
|
||||
" numbers (list of int's/float's): numbers to be averaged;\n",
|
||||
" if non-whole numbers are provided, they are rounded\n",
|
||||
" scalar (float, optional): multiplies the average; defaults to 1\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" Returns:\n",
|
||||
" scaled_average (float)\n",
|
||||
"\n"
|
||||
|
|
@ -1593,7 +1607,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.12.2"
|
||||
},
|
||||
"livereveal": {
|
||||
"auto_select": "code",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue