Skip to content

Commit cf34170

Browse files
committed
numbers update
1 parent 0a36346 commit cf34170

File tree

1 file changed

+108
-53
lines changed

1 file changed

+108
-53
lines changed

003_datatype_numbers/datatype_numbers.ipynb

Lines changed: 108 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,168 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## የውህብ አይነት ፦ ቁጥር\n",
8+
"\n",
9+
"#### ኢንቲጀር\n",
10+
"- ሙሉ ቁጥሮች ፤ ኔጌቲቭ ፣ ፖዘቲቭ እና 0 … -3,-2,-1,0,1,2,3…\n",
11+
"- type : int\n",
12+
"#### ፍሎት\n",
13+
"- ፍራክሽን ያላቸው ቁጥሮች ፤ 5.0,1.6\n",
14+
"- type: float\n",
15+
"#### ኮምፕሌክስ\n",
16+
"- ኢማጂነሪ ክፍል ያላቸው ቁጥሮች ፤ 3+2j , 3+2J\n",
17+
"- type: complex"
18+
]
19+
},
320
{
421
"cell_type": "code",
5-
"execution_count": 2,
22+
"execution_count": 24,
623
"metadata": {},
724
"outputs": [
825
{
926
"data": {
1027
"text/plain": [
11-
"1"
28+
"int"
1229
]
1330
},
14-
"execution_count": 2,
31+
"execution_count": 24,
1532
"metadata": {},
1633
"output_type": "execute_result"
1734
}
1835
],
1936
"source": [
20-
"1"
37+
"type(34)"
2138
]
2239
},
2340
{
2441
"cell_type": "code",
25-
"execution_count": 3,
42+
"execution_count": 26,
2643
"metadata": {},
27-
"outputs": [],
44+
"outputs": [
45+
{
46+
"data": {
47+
"text/plain": [
48+
"float"
49+
]
50+
},
51+
"execution_count": 26,
52+
"metadata": {},
53+
"output_type": "execute_result"
54+
}
55+
],
2856
"source": [
29-
"a = 2\n",
30-
"b = 3"
57+
"type(3.2)"
3158
]
3259
},
3360
{
3461
"cell_type": "code",
35-
"execution_count": 4,
62+
"execution_count": 28,
3663
"metadata": {},
37-
"outputs": [],
64+
"outputs": [
65+
{
66+
"data": {
67+
"text/plain": [
68+
"complex"
69+
]
70+
},
71+
"execution_count": 28,
72+
"metadata": {},
73+
"output_type": "execute_result"
74+
}
75+
],
3876
"source": [
39-
"c = a + b"
77+
"type(2+3j)"
4078
]
4179
},
4280
{
43-
"cell_type": "code",
44-
"execution_count": 5,
81+
"cell_type": "markdown",
4582
"metadata": {},
46-
"outputs": [
47-
{
48-
"name": "stdout",
49-
"output_type": "stream",
50-
"text": [
51-
"5\n"
52-
]
53-
}
54-
],
5583
"source": [
56-
"print(c)"
84+
"#### ፓይተንን እንደ Calculator"
5785
]
5886
},
5987
{
6088
"cell_type": "markdown",
6189
"metadata": {},
6290
"source": [
63-
"#### ኢንቲጀር\n",
64-
"- ሙሉ ቁጥሮች ፤ ኔጌቲቭ ፣ ፖዘቲቭ እና 0 … -3,-2,-1,0,1,2,3…\n",
65-
"#### ፍሎት\n",
66-
"- ፍራክሽን ያላቸው ቁጥሮች ፤ 5.0,1.6\n",
67-
"#### ኮምፕሌክስ\n",
68-
"- ኢማጂነሪ ክፍል ያላቸው ቁጥሮች ፤ 3+2j , 3+2J\n"
91+
"- የሂሳብ ኦፐሬተሮች ፤ + ፣ - ፣ * ፣ /"
6992
]
7093
},
7194
{
7295
"cell_type": "code",
73-
"execution_count": 6,
96+
"execution_count": 30,
7497
"metadata": {},
7598
"outputs": [
7699
{
77100
"data": {
78101
"text/plain": [
79-
"41.65217391304348"
102+
"1.344601549428248e+16"
80103
]
81104
},
82-
"execution_count": 6,
105+
"execution_count": 30,
83106
"metadata": {},
84107
"output_type": "execute_result"
85108
}
86109
],
87110
"source": [
88-
"23 + 23 - 5 * 2 /2.3"
111+
"389349845 *34534534-4353454/45345 + 34235345"
112+
]
113+
},
114+
{
115+
"cell_type": "markdown",
116+
"metadata": {},
117+
"source": [
118+
"- / ውጤቱ ሁሌም ፍሎት ቁጥር ነው ። __[PEP 238](https://www.python.org/dev/peps/pep-0238/)__"
89119
]
90120
},
91121
{
92122
"cell_type": "code",
93-
"execution_count": 8,
123+
"execution_count": 31,
94124
"metadata": {},
95125
"outputs": [
96126
{
97127
"data": {
98128
"text/plain": [
99-
"38.652173913043484"
129+
"2.0"
100130
]
101131
},
102-
"execution_count": 8,
132+
"execution_count": 31,
103133
"metadata": {},
104134
"output_type": "execute_result"
105135
}
106136
],
107137
"source": [
108-
"23 + (23 - 5) * 2 /2.3"
138+
"6/3"
109139
]
110140
},
111141
{
112142
"cell_type": "markdown",
113143
"metadata": {},
114144
"source": [
115-
"- / ውጤቱ ሁሌም ፍሎት ቁጥር ነው ። "
145+
"- የስሌት ቅደም-ተከተል __[BODMAS](https://en.wikipedia.org/wiki/Order_of_operations)__ - order of operations"
116146
]
117147
},
118148
{
119149
"cell_type": "code",
120-
"execution_count": 11,
150+
"execution_count": 32,
121151
"metadata": {},
122152
"outputs": [
123153
{
124154
"data": {
125155
"text/plain": [
126-
"2.0"
156+
"-14.5"
127157
]
128158
},
129-
"execution_count": 11,
159+
"execution_count": 32,
130160
"metadata": {},
131161
"output_type": "execute_result"
132162
}
133163
],
134164
"source": [
135-
"6/3"
165+
"34 - 45 * 3 / 2 + (34-3*5)"
136166
]
137167
},
138168
{
@@ -144,22 +174,22 @@
144174
},
145175
{
146176
"cell_type": "code",
147-
"execution_count": 14,
177+
"execution_count": 34,
148178
"metadata": {},
149179
"outputs": [
150180
{
151181
"data": {
152182
"text/plain": [
153-
"1"
183+
"3"
154184
]
155185
},
156-
"execution_count": 14,
186+
"execution_count": 34,
157187
"metadata": {},
158188
"output_type": "execute_result"
159189
}
160190
],
161191
"source": [
162-
"3//2"
192+
"7//2"
163193
]
164194
},
165195
{
@@ -171,7 +201,7 @@
171201
},
172202
{
173203
"cell_type": "code",
174-
"execution_count": 16,
204+
"execution_count": 35,
175205
"metadata": {},
176206
"outputs": [
177207
{
@@ -180,13 +210,13 @@
180210
"1"
181211
]
182212
},
183-
"execution_count": 16,
213+
"execution_count": 35,
184214
"metadata": {},
185215
"output_type": "execute_result"
186216
}
187217
],
188218
"source": [
189-
"9%4"
219+
"13%3"
190220
]
191221
},
192222
{
@@ -198,7 +228,7 @@
198228
},
199229
{
200230
"cell_type": "code",
201-
"execution_count": 17,
231+
"execution_count": 37,
202232
"metadata": {},
203233
"outputs": [
204234
{
@@ -207,7 +237,7 @@
207237
"8"
208238
]
209239
},
210-
"execution_count": 17,
240+
"execution_count": 37,
211241
"metadata": {},
212242
"output_type": "execute_result"
213243
}
@@ -216,9 +246,16 @@
216246
"2**3"
217247
]
218248
},
249+
{
250+
"cell_type": "markdown",
251+
"metadata": {},
252+
"source": [
253+
"- = ለተባራይ ዋጋ ለመስጠት (assign value) የምንጠቀምበት"
254+
]
255+
},
219256
{
220257
"cell_type": "code",
221-
"execution_count": 18,
258+
"execution_count": 39,
222259
"metadata": {},
223260
"outputs": [
224261
{
@@ -230,7 +267,8 @@
230267
}
231268
],
232269
"source": [
233-
"print(_)"
270+
"a = 2**3\n",
271+
"print(a)"
234272
]
235273
},
236274
{
@@ -239,6 +277,23 @@
239277
"source": [
240278
"- \"_\" መጨረሻ ላይ የታተመውን ዋጋ የሚቀበል ተባራይ"
241279
]
280+
},
281+
{
282+
"cell_type": "code",
283+
"execution_count": 40,
284+
"metadata": {},
285+
"outputs": [
286+
{
287+
"name": "stdout",
288+
"output_type": "stream",
289+
"text": [
290+
"8\n"
291+
]
292+
}
293+
],
294+
"source": [
295+
"print(_)"
296+
]
242297
}
243298
],
244299
"metadata": {

0 commit comments

Comments
 (0)