Skip to content

Commit ecdceec

Browse files
Add files via upload
1 parent 1da6bf2 commit ecdceec

File tree

5 files changed

+1497
-0
lines changed

5 files changed

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

0 commit comments

Comments
 (0)