Skip to content

Commit 66475d2

Browse files
authored
Merge pull request #44 from sikepuri-algorithm/manuscript
Manuscript
2 parents bf8de2e + 6a2d0c5 commit 66475d2

27 files changed

+779
-3
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3-
exclude: static/img/
3+
exclude: (
4+
static/img/
5+
docs/05function/_samples/indent.ipynb
6+
)
47
repos:
58
- repo: https://github.com/pre-commit/pre-commit-hooks
69
rev: v4.3.0
@@ -63,7 +66,7 @@ repos:
6366
- id: nbqa-flake8
6467
- id: nbqa-isort
6568
- id: nbqa-mypy
66-
- id: nbqa-pylint
69+
# - id: nbqa-pylint
6770
- id: nbqa-pyupgrade
6871
- id: nbqa-yapf
6972
- id: nbqa-autopep8

docs/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ Python やアルゴリズムについて簡単にまとめていこうかなと
2727
10/10 練習問題を追加
2828

2929
10/16 練習問題をさらに追加
30+
31+
10/23 第二週の分を執筆 [ここから](/docs/python/05function/)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"G = 6.7 * 10 ** (-11)\n",
10+
"\n",
11+
"\n",
12+
"def F(r, M, m):\n",
13+
" return G * M * m / r**2\n",
14+
"\n",
15+
"\n",
16+
"F(2, 60, 20)"
17+
],
18+
"cell_type": "code",
19+
"outputs": [
20+
{
21+
"output_type": "execute_result",
22+
"data": {
23+
"text/plain": [
24+
"2.0099999999999998e-08"
25+
]
26+
},
27+
"metadata": {},
28+
"execution_count": 2
29+
}
30+
],
31+
"execution_count": null
32+
}
33+
]
34+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def hello():\n",
10+
" print(\"Hello!\")\n",
11+
"\n",
12+
"\n",
13+
"hello()"
14+
],
15+
"cell_type": "code",
16+
"outputs": [
17+
{
18+
"output_type": "stream",
19+
"name": "stdout",
20+
"text": [
21+
"Hello!\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def f(x):\n",
10+
"return x**2\n",
11+
"\n",
12+
"f(2)+f(3)"
13+
],
14+
"cell_type": "code",
15+
"outputs": [
16+
{
17+
"output_type": "error",
18+
"ename": "IndentationError",
19+
"evalue": "expected an indented block after function definition on line 1 (3556709620.py, line 2)",
20+
"traceback": [
21+
"\u001b[0;36m Cell \u001b[0;32mIn [1], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m return x**2\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block after function definition on line 1\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def introduce_self(name, language):\n",
10+
" print(f\"\u79c1\u306e\u540d\u524d\u306f\u3001{name}\u3067\u3059\u3002{language}\u9078\u629e\u3067\u3059\u3002\")\n",
11+
"\n",
12+
"\n",
13+
"introduce_self(\"\u6771\u5927\u592a\u90ce\", \"\u4e2d\u56fd\u8a9e\")"
14+
],
15+
"cell_type": "code",
16+
"outputs": [
17+
{
18+
"output_type": "stream",
19+
"name": "stdout",
20+
"text": [
21+
"\u79c1\u306e\u540d\u524d\u306f\u3001\u6771\u5927\u592a\u90ce\u3067\u3059\u3002\u4e2d\u56fd\u8a9e\u9078\u629e\u3067\u3059\u3002\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def introduce_self(name, language):\n",
10+
" print(\"\u79c1\u306e\u540d\u524d\u306f\u3001\" + name + \"\u3067\u3059\u3002\" + language + \"\u9078\u629e\u3067\u3059\u3002\")\n",
11+
"\n",
12+
"\n",
13+
"introduce_self(\"\u6771\u5927\u592a\u90ce\", \"\u4e2d\u56fd\u8a9e\")"
14+
],
15+
"cell_type": "code",
16+
"outputs": [
17+
{
18+
"output_type": "stream",
19+
"name": "stdout",
20+
"text": [
21+
"\u79c1\u306e\u540d\u524d\u306f\u3001\u6771\u5927\u592a\u90ce\u3067\u3059\u3002\u4e2d\u56fd\u8a9e\u9078\u629e\u3067\u3059\u3002\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def introduce_self(name):\n",
10+
" print(f\"\u79c1\u306e\u540d\u524d\u306f\u3001{name}\u3067\u3059\u3002\")\n",
11+
"\n",
12+
"\n",
13+
"introduce_self(\"\u7530\u4e2d\")"
14+
],
15+
"cell_type": "code",
16+
"outputs": [
17+
{
18+
"output_type": "stream",
19+
"name": "stdout",
20+
"text": [
21+
"\u79c1\u306e\u540d\u524d\u306f\u3001\u7530\u4e2d\u3067\u3059\u3002\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def introduce_self(name):\n",
10+
" print(\"\u79c1\u306e\u540d\u524d\u306f\u3001\" + name + \"\u3067\u3059\u3002\")\n",
11+
"\n",
12+
"\n",
13+
"introduce_self(\"\u7530\u4e2d\")"
14+
],
15+
"cell_type": "code",
16+
"outputs": [
17+
{
18+
"output_type": "stream",
19+
"name": "stdout",
20+
"text": [
21+
"\u79c1\u306e\u540d\u524d\u306f\u3001\u7530\u4e2d\u3067\u3059\u3002\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"def introduce_self(name):\n",
10+
" return f\"\u79c1\u306e\u540d\u524d\u306f\u3001{name}\u3067\u3059\u3002\"\n",
11+
"\n",
12+
"\n",
13+
"print(introduce_self(\"\u5c0f\u6797\"))"
14+
],
15+
"cell_type": "code",
16+
"outputs": [
17+
{
18+
"output_type": "stream",
19+
"name": "stdout",
20+
"text": [
21+
"\u79c1\u306e\u540d\u524d\u306f\u3001\u5c0f\u6797\u3067\u3059\u3002\n"
22+
]
23+
}
24+
],
25+
"execution_count": null
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)