File tree Expand file tree Collapse file tree 1 file changed +1
-174
lines changed Expand file tree Collapse file tree 1 file changed +1
-174
lines changed Original file line number Diff line number Diff line change 26
26
"cell_type" : " markdown" ,
27
27
"metadata" : {},
28
28
"source" : [
29
- " # 2. 数字 \n " ,
30
- " Python 的核心对象集合包括常规的类型:整数、浮点数以及更为少见的类型(有虚部的复数、固定精度的十进制数、带分子和分母的有理分数以及集合等)。"
31
- ]
32
- },
33
- {
34
- "cell_type" : " code" ,
35
- "execution_count" : 1 ,
36
- "metadata" : {},
37
- "outputs" : [
38
- {
39
- "data" : {
40
- "text/plain" : [
41
- " 345"
42
- ]
43
- },
44
- "execution_count" : 1 ,
45
- "metadata" : {},
46
- "output_type" : " execute_result"
47
- }
48
- ],
49
- "source" : [
50
- " 123 + 222 # 整数加法"
51
- ]
52
- },
53
- {
54
- "cell_type" : " code" ,
55
- "execution_count" : 2 ,
56
- "metadata" : {},
57
- "outputs" : [
58
- {
59
- "data" : {
60
- "text/plain" : [
61
- " 6.0"
62
- ]
63
- },
64
- "execution_count" : 2 ,
65
- "metadata" : {},
66
- "output_type" : " execute_result"
67
- }
68
- ],
69
- "source" : [
70
- " 1.5 * 4 # 浮点数乘法"
71
- ]
72
- },
73
- {
74
- "cell_type" : " code" ,
75
- "execution_count" : 3 ,
76
- "metadata" : {
77
- "scrolled" : true
78
- },
79
- "outputs" : [
80
- {
81
- "data" : {
82
- "text/plain" : [
83
- " 1267650600228229401496703205376"
84
- ]
85
- },
86
- "execution_count" : 3 ,
87
- "metadata" : {},
88
- "output_type" : " execute_result"
89
- }
90
- ],
91
- "source" : [
92
- " 2 ** 100 # 2 的 100 次方"
93
- ]
94
- },
95
- {
96
- "cell_type" : " code" ,
97
- "execution_count" : 5 ,
98
- "metadata" : {},
99
- "outputs" : [
100
- {
101
- "data" : {
102
- "text/plain" : [
103
- " 3.141592653589793"
104
- ]
105
- },
106
- "execution_count" : 5 ,
107
- "metadata" : {},
108
- "output_type" : " execute_result"
109
- }
110
- ],
111
- "source" : [
112
- " import math\n " ,
113
- " math.pi"
114
- ]
115
- },
116
- {
117
- "cell_type" : " code" ,
118
- "execution_count" : 6 ,
119
- "metadata" : {},
120
- "outputs" : [
121
- {
122
- "data" : {
123
- "text/plain" : [
124
- " 9.219544457292887"
125
- ]
126
- },
127
- "execution_count" : 6 ,
128
- "metadata" : {},
129
- "output_type" : " execute_result"
130
- }
131
- ],
132
- "source" : [
133
- " math.sqrt(85)"
134
- ]
135
- },
136
- {
137
- "cell_type" : " code" ,
138
- "execution_count" : 7 ,
139
- "metadata" : {},
140
- "outputs" : [
141
- {
142
- "data" : {
143
- "text/plain" : [
144
- " 0.11591978672141845"
145
- ]
146
- },
147
- "execution_count" : 7 ,
148
- "metadata" : {},
149
- "output_type" : " execute_result"
150
- }
151
- ],
152
- "source" : [
153
- " import random\n " ,
154
- " random.random()"
155
- ]
156
- },
157
- {
158
- "cell_type" : " code" ,
159
- "execution_count" : 8 ,
160
- "metadata" : {},
161
- "outputs" : [
162
- {
163
- "data" : {
164
- "text/plain" : [
165
- " 2"
166
- ]
167
- },
168
- "execution_count" : 8 ,
169
- "metadata" : {},
170
- "output_type" : " execute_result"
171
- }
172
- ],
173
- "source" : [
174
- " random.choice([1, 2, 3, 4])"
175
- ]
176
- },
177
- {
178
- "cell_type" : " markdown" ,
179
- "metadata" : {},
180
- "source" : [
181
- " # 3. 字符串\n "
182
- ]
183
- },
184
- {
185
- "cell_type" : " code" ,
186
- "execution_count" : null ,
187
- "metadata" : {},
188
- "outputs" : [],
189
- "source" : []
190
- },
191
- {
192
- "cell_type" : " code" ,
193
- "execution_count" : null ,
194
- "metadata" : {},
195
- "outputs" : [],
196
- "source" : []
197
- },
198
- {
199
- "cell_type" : " markdown" ,
200
- "metadata" : {},
201
- "source" : [
202
- " # 1. 变量"
29
+ " # 2. 变量"
203
30
]
204
31
},
205
32
{
You can’t perform that action at this time.
0 commit comments