Skip to content

Commit 43bda18

Browse files
committed
2016.12.6 edit lesson 2
1 parent a94cb2b commit 43bda18

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

python_basic/python_basic_lesson_02.ipynb

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"cell_type": "code",
4949
"execution_count": 1,
5050
"metadata": {
51-
"collapsed": false
51+
"collapsed": false,
52+
"scrolled": true
5253
},
5354
"outputs": [
5455
{
@@ -827,36 +828,25 @@
827828
"print(t)"
828829
]
829830
},
830-
{
831-
"cell_type": "code",
832-
"execution_count": 10,
833-
"metadata": {
834-
"collapsed": false
835-
},
836-
"outputs": [
837-
{
838-
"name": "stdout",
839-
"output_type": "stream",
840-
"text": [
841-
"Jerry\n"
842-
]
843-
}
844-
],
845-
"source": []
846-
},
847831
{
848832
"cell_type": "markdown",
849833
"metadata": {},
850834
"source": [
851-
"随机数\n",
835+
"---\n",
836+
"\n",
837+
"#### 随机数\n",
852838
"\n",
853839
"随机数这一概念在不同领域有着不同的含义,在密码学、通信领域有着非常重要的用途。\n",
854840
"\n",
855-
"Python 的随机数模块是 random\n",
841+
"Python 的随机数模块是 random,random 模块主要有以下函数,结合例子来看看。\n",
856842
"\n",
857-
"* 随机挑选 random.choice(),random.sample() \n",
858-
"* 随机生成 random.random(), random.uniform(), random.randint()\n",
859-
"* 随机排列 random.shuffle()\n"
843+
"* random.choice()\n",
844+
"* random.sample() \n",
845+
"* random.random()\n",
846+
"* random.uniform()\n",
847+
"* random.randint()\n",
848+
"* random.shuffle()\n",
849+
"* random.sample"
860850
]
861851
},
862852
{
@@ -1063,6 +1053,15 @@
10631053
"print(random.sample(range(10),7))"
10641054
]
10651055
},
1056+
{
1057+
"cell_type": "markdown",
1058+
"metadata": {},
1059+
"source": [
1060+
"---\n",
1061+
"\n",
1062+
"python 程序举例"
1063+
]
1064+
},
10661065
{
10671066
"cell_type": "code",
10681067
"execution_count": 22,
@@ -1249,7 +1248,7 @@
12491248
"name": "python",
12501249
"nbconvert_exporter": "python",
12511250
"pygments_lexer": "ipython3",
1252-
"version": "3.4.4"
1251+
"version": "3.5.1"
12531252
}
12541253
},
12551254
"nbformat": 4,

0 commit comments

Comments
 (0)