Skip to content

Commit eccda17

Browse files
advanced numbers notes
1 parent f5add72 commit eccda17

File tree

2 files changed

+604
-0
lines changed

2 files changed

+604
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"**bin**: binary"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": 1,
13+
"metadata": {},
14+
"outputs": [
15+
{
16+
"data": {
17+
"text/plain": [
18+
"'0b100'"
19+
]
20+
},
21+
"execution_count": 1,
22+
"metadata": {},
23+
"output_type": "execute_result"
24+
}
25+
],
26+
"source": [
27+
"bin(4)"
28+
]
29+
},
30+
{
31+
"cell_type": "code",
32+
"execution_count": 2,
33+
"metadata": {},
34+
"outputs": [
35+
{
36+
"data": {
37+
"text/plain": [
38+
"'0b111'"
39+
]
40+
},
41+
"execution_count": 2,
42+
"metadata": {},
43+
"output_type": "execute_result"
44+
}
45+
],
46+
"source": [
47+
"bin(7)"
48+
]
49+
},
50+
{
51+
"cell_type": "markdown",
52+
"metadata": {},
53+
"source": [
54+
"**hex**:hexadecimal"
55+
]
56+
},
57+
{
58+
"cell_type": "code",
59+
"execution_count": 3,
60+
"metadata": {},
61+
"outputs": [
62+
{
63+
"data": {
64+
"text/plain": [
65+
"'0x44'"
66+
]
67+
},
68+
"execution_count": 3,
69+
"metadata": {},
70+
"output_type": "execute_result"
71+
}
72+
],
73+
"source": [
74+
"hex(68)"
75+
]
76+
},
77+
{
78+
"cell_type": "code",
79+
"execution_count": 5,
80+
"metadata": {},
81+
"outputs": [
82+
{
83+
"data": {
84+
"text/plain": [
85+
"'0x11'"
86+
]
87+
},
88+
"execution_count": 5,
89+
"metadata": {},
90+
"output_type": "execute_result"
91+
}
92+
],
93+
"source": [
94+
"hex(17)"
95+
]
96+
},
97+
{
98+
"cell_type": "markdown",
99+
"metadata": {},
100+
"source": [
101+
"**abs**:absolute"
102+
]
103+
},
104+
{
105+
"cell_type": "code",
106+
"execution_count": 6,
107+
"metadata": {},
108+
"outputs": [
109+
{
110+
"data": {
111+
"text/plain": [
112+
"4.5"
113+
]
114+
},
115+
"execution_count": 6,
116+
"metadata": {},
117+
"output_type": "execute_result"
118+
}
119+
],
120+
"source": [
121+
"abs(-4.5)"
122+
]
123+
},
124+
{
125+
"cell_type": "markdown",
126+
"metadata": {},
127+
"source": [
128+
"**round**"
129+
]
130+
},
131+
{
132+
"cell_type": "code",
133+
"execution_count": 7,
134+
"metadata": {},
135+
"outputs": [
136+
{
137+
"data": {
138+
"text/plain": [
139+
"3"
140+
]
141+
},
142+
"execution_count": 7,
143+
"metadata": {},
144+
"output_type": "execute_result"
145+
}
146+
],
147+
"source": [
148+
"round(3.4)"
149+
]
150+
},
151+
{
152+
"cell_type": "code",
153+
"execution_count": 8,
154+
"metadata": {},
155+
"outputs": [
156+
{
157+
"data": {
158+
"text/plain": [
159+
"13"
160+
]
161+
},
162+
"execution_count": 8,
163+
"metadata": {},
164+
"output_type": "execute_result"
165+
}
166+
],
167+
"source": [
168+
"round(12.8)"
169+
]
170+
},
171+
{
172+
"cell_type": "markdown",
173+
"metadata": {},
174+
"source": [
175+
"**max** and **min**"
176+
]
177+
},
178+
{
179+
"cell_type": "code",
180+
"execution_count": 9,
181+
"metadata": {},
182+
"outputs": [
183+
{
184+
"data": {
185+
"text/plain": [
186+
"100"
187+
]
188+
},
189+
"execution_count": 9,
190+
"metadata": {},
191+
"output_type": "execute_result"
192+
}
193+
],
194+
"source": [
195+
"max(3,4,2,8,12,100,6,78)"
196+
]
197+
},
198+
{
199+
"cell_type": "code",
200+
"execution_count": 10,
201+
"metadata": {},
202+
"outputs": [
203+
{
204+
"data": {
205+
"text/plain": [
206+
"2"
207+
]
208+
},
209+
"execution_count": 10,
210+
"metadata": {},
211+
"output_type": "execute_result"
212+
}
213+
],
214+
"source": [
215+
"min(3,4,2,8,12,100,6,78)"
216+
]
217+
},
218+
{
219+
"cell_type": "markdown",
220+
"metadata": {},
221+
"source": [
222+
"**sum**"
223+
]
224+
},
225+
{
226+
"cell_type": "code",
227+
"execution_count": 11,
228+
"metadata": {},
229+
"outputs": [
230+
{
231+
"data": {
232+
"text/plain": [
233+
"64"
234+
]
235+
},
236+
"execution_count": 11,
237+
"metadata": {},
238+
"output_type": "execute_result"
239+
}
240+
],
241+
"source": [
242+
"liste=[1,2,8,34,7,12]\n",
243+
"sum(liste)"
244+
]
245+
},
246+
{
247+
"cell_type": "markdown",
248+
"metadata": {},
249+
"source": [
250+
"**pow**"
251+
]
252+
},
253+
{
254+
"cell_type": "code",
255+
"execution_count": 12,
256+
"metadata": {},
257+
"outputs": [
258+
{
259+
"data": {
260+
"text/plain": [
261+
"81"
262+
]
263+
},
264+
"execution_count": 12,
265+
"metadata": {},
266+
"output_type": "execute_result"
267+
}
268+
],
269+
"source": [
270+
"pow(3,4)"
271+
]
272+
},
273+
{
274+
"cell_type": "code",
275+
"execution_count": null,
276+
"metadata": {},
277+
"outputs": [],
278+
"source": []
279+
}
280+
],
281+
"metadata": {
282+
"kernelspec": {
283+
"display_name": "Python 3",
284+
"language": "python",
285+
"name": "python3"
286+
},
287+
"language_info": {
288+
"codemirror_mode": {
289+
"name": "ipython",
290+
"version": 3
291+
},
292+
"file_extension": ".py",
293+
"mimetype": "text/x-python",
294+
"name": "python",
295+
"nbconvert_exporter": "python",
296+
"pygments_lexer": "ipython3",
297+
"version": "3.7.3"
298+
}
299+
},
300+
"nbformat": 4,
301+
"nbformat_minor": 4
302+
}

0 commit comments

Comments
 (0)