Skip to content

Commit 5c852e1

Browse files
authored
Merge pull request #58 from sikepuri-algorithm/manuscript
Manuscript
2 parents 75143b2 + 692c86e commit 5c852e1

File tree

13 files changed

+267
-8
lines changed

13 files changed

+267
-8
lines changed

docs/extras/5tex/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ lualatex sample.tex
112112

113113
- `sample.pdf` という名前のファイルができるので、それを開く。
114114

115+
:::tip
116+
Mac を使っている場合は、バックスラッシュ( `\` )は、`Alt` を押しながら `¥` を押せば、打つことができます。
117+
:::
118+
115119
:::tip
116120
LuaLaTeX 以外も使うことができます。pLaTeX で jsarticle を使う例も載せておきます。
117121

docs/index.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ Python やアルゴリズムについて簡単にまとめていこうかなと
2424

2525
## 更新履歴
2626

27-
10/10 第一周の分を執筆 [ここから](/docs/python/01google-colaboratory/)
27+
11/6 range 関数についてを補足 [この下](http://localhost:3000/docs/python/08array/#%E5%95%8F%E9%A1%8C-1)
2828

29-
10/10 練習問題を追加
29+
10/30 第三週の分を執筆 [ここから](/docs/python/07for/)
30+
31+
10/23 第二週の分を執筆 [ここから](/docs/python/05function/)
3032

3133
10/16 練習問題をさらに追加
3234

33-
10/23 第二週の分を執筆 [ここから](/docs/python/05function/)
35+
10/10 練習問題を追加
3436

35-
10/30 第三週の分を執筆 [ここから](/docs/python/07for/)
37+
10/10 第一周の分を執筆 [ここから](/docs/python/01google-colaboratory/)

docs/python/05function/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ $G=6.7\times 10^{-11}$、$r=2$、$M=60$、$m=20$ とします。
8787
<Answer>
8888
<ViewSource path="_samples/introduce_language.ipynb" />
8989

90+
:::note
9091
`f-string` を使わないと次のようになります。
9192

9293
<ViewSource path="_samples/introduce_language2.ipynb" />
94+
:::
9395
</Answer>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"sum(range(1, 11))"
10+
],
11+
"cell_type": "code",
12+
"outputs": [
13+
{
14+
"output_type": "execute_result",
15+
"data": {
16+
"text/plain": [
17+
"55"
18+
]
19+
},
20+
"metadata": {},
21+
"execution_count": 1
22+
}
23+
],
24+
"execution_count": null
25+
}
26+
]
27+
}

docs/python/07for/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ while(条件):
9292

9393
### 練習問題 1
9494

95-
1 から n までの和を求める関数を作って、実際に 1 から 10 までの和を求めてみましょう。
95+
$1$ から $n$ までの和を求める関数を作って、実際に 1 から 10 までの和を求めてみましょう。
9696

9797
<Answer>
98-
<ViewSource path="_samples/upto.ipynb" />
98+
<ViewSource path="_samples/upto.ipynb" />
99+
100+
実は、このプログラムは次のようにしてもっと簡単に書くことができます。しかし、次項の配列の内容がわかっていないと理解できないため、次項で詳しく紹介します。
101+
102+
<ViewSource path="_samples/upto_sum.ipynb" />
99103
</Answer>
100104

101105
### 練習問題 2
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"import numpy\n",
10+
"\n",
11+
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
12+
"numpy.mean(scores)"
13+
],
14+
"cell_type": "code",
15+
"outputs": [
16+
{
17+
"output_type": "execute_result",
18+
"data": {
19+
"text/plain": [
20+
"40.2"
21+
]
22+
},
23+
"metadata": {},
24+
"execution_count": 1
25+
}
26+
],
27+
"execution_count": null
28+
}
29+
]
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"import statistics\n",
10+
"\n",
11+
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
12+
"statistics.mean(scores)"
13+
],
14+
"cell_type": "code",
15+
"outputs": [
16+
{
17+
"output_type": "execute_result",
18+
"data": {
19+
"text/plain": [
20+
"40.2"
21+
]
22+
},
23+
"metadata": {},
24+
"execution_count": 1
25+
}
26+
],
27+
"execution_count": null
28+
}
29+
]
30+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"print(range(1, 11))\n",
10+
"print(list(range(1, 11)))"
11+
],
12+
"cell_type": "code",
13+
"outputs": [
14+
{
15+
"output_type": "stream",
16+
"name": "stdout",
17+
"text": [
18+
"range(1, 11)\n",
19+
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n"
20+
]
21+
}
22+
],
23+
"execution_count": null
24+
}
25+
]
26+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"sum([1, 2, 3])"
10+
],
11+
"cell_type": "code",
12+
"outputs": [
13+
{
14+
"output_type": "execute_result",
15+
"data": {
16+
"text/plain": [
17+
"6"
18+
]
19+
},
20+
"metadata": {},
21+
"execution_count": 2
22+
}
23+
],
24+
"execution_count": null
25+
}
26+
]
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
5+
"cells": [
6+
{
7+
"metadata": {},
8+
"source": [
9+
"sum([2, 5, 7])"
10+
],
11+
"cell_type": "code",
12+
"outputs": [
13+
{
14+
"output_type": "execute_result",
15+
"data": {
16+
"text/plain": [
17+
"14"
18+
]
19+
},
20+
"metadata": {},
21+
"execution_count": 1
22+
}
23+
],
24+
"execution_count": null
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)