Skip to content

Commit 54cabb0

Browse files
committed
changes
1 parent 9218bf9 commit 54cabb0

File tree

5 files changed

+316
-17
lines changed

5 files changed

+316
-17
lines changed

03-python-operators-conditional-statements.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
},
291291
{
292292
"cell_type": "code",
293-
"execution_count": 3,
293+
"execution_count": 2,
294294
"id": "7e1ee9bc",
295295
"metadata": {},
296296
"outputs": [
@@ -311,6 +311,12 @@
311311
" print(\"b is equal to a\") "
312312
]
313313
},
314+
{
315+
"cell_type": "markdown",
316+
"id": "6bf111ff",
317+
"metadata": {},
318+
"source": []
319+
},
314320
{
315321
"cell_type": "code",
316322
"execution_count": null,

04-python-lists.ipynb

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 2,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"l=list('1 2')"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 3,
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"name": "stdout",
19+
"output_type": "stream",
20+
"text": [
21+
"['1', ' ', '2']\n"
22+
]
23+
}
24+
],
25+
"source": [
26+
"print(l)"
27+
]
28+
}
29+
],
30+
"metadata": {
31+
"kernelspec": {
32+
"display_name": "Python 3.9.12 ('base')",
33+
"language": "python",
34+
"name": "python3"
35+
},
36+
"language_info": {
37+
"codemirror_mode": {
38+
"name": "ipython",
39+
"version": 3
40+
},
41+
"file_extension": ".py",
42+
"mimetype": "text/x-python",
43+
"name": "python",
44+
"nbconvert_exporter": "python",
45+
"pygments_lexer": "ipython3",
46+
"version": "3.9.12"
47+
},
48+
"orig_nbformat": 4,
49+
"vscode": {
50+
"interpreter": {
51+
"hash": "daee99e6893c0f9b4fa2cee7c11289a4ac1788238c3c1d2caa83921531d37465"
52+
}
53+
}
54+
},
55+
"nbformat": 4,
56+
"nbformat_minor": 2
57+
}

05-python-functions.ipynb

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 2,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"#functions\n",
10+
"#simple function\n",
11+
"def hello():\n",
12+
" print('hello function')\n"
13+
]
14+
},
15+
{
16+
"cell_type": "code",
17+
"execution_count": 3,
18+
"metadata": {},
19+
"outputs": [
20+
{
21+
"data": {
22+
"text/plain": [
23+
"function"
24+
]
25+
},
26+
"execution_count": 3,
27+
"metadata": {},
28+
"output_type": "execute_result"
29+
}
30+
],
31+
"source": [
32+
"type(hello)"
33+
]
34+
},
35+
{
36+
"cell_type": "code",
37+
"execution_count": 3,
38+
"metadata": {},
39+
"outputs": [
40+
{
41+
"name": "stdout",
42+
"output_type": "stream",
43+
"text": [
44+
"hello\n"
45+
]
46+
}
47+
],
48+
"source": [
49+
"a='hello'\n",
50+
"print(a)"
51+
]
52+
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": 6,
56+
"metadata": {},
57+
"outputs": [],
58+
"source": [
59+
"def sum():\n",
60+
" print(10+30)\n",
61+
"\n",
62+
" "
63+
]
64+
},
65+
{
66+
"cell_type": "code",
67+
"execution_count": 1,
68+
"metadata": {},
69+
"outputs": [],
70+
"source": [
71+
"def my_value():\n",
72+
" x = 50\n",
73+
" print(\"value inside function:\",x) "
74+
]
75+
},
76+
{
77+
"cell_type": "code",
78+
"execution_count": 2,
79+
"metadata": {},
80+
"outputs": [
81+
{
82+
"name": "stdout",
83+
"output_type": "stream",
84+
"text": [
85+
"value inside function: 50\n"
86+
]
87+
}
88+
],
89+
"source": [
90+
"my_value()"
91+
]
92+
},
93+
{
94+
"cell_type": "code",
95+
"execution_count": 4,
96+
"metadata": {},
97+
"outputs": [],
98+
"source": [
99+
"#a simple python function\n",
100+
"def fun():\n",
101+
" print(\"welcome to tops\")"
102+
]
103+
},
104+
{
105+
"cell_type": "code",
106+
"execution_count": 5,
107+
"metadata": {},
108+
"outputs": [
109+
{
110+
"name": "stdout",
111+
"output_type": "stream",
112+
"text": [
113+
"welcome to tops\n"
114+
]
115+
}
116+
],
117+
"source": [
118+
"fun()"
119+
]
120+
},
121+
{
122+
"cell_type": "code",
123+
"execution_count": null,
124+
"metadata": {},
125+
"outputs": [],
126+
"source": []
127+
}
128+
],
129+
"metadata": {
130+
"kernelspec": {
131+
"display_name": "Python 3.9.12 ('base')",
132+
"language": "python",
133+
"name": "python3"
134+
},
135+
"language_info": {
136+
"codemirror_mode": {
137+
"name": "ipython",
138+
"version": 3
139+
},
140+
"file_extension": ".py",
141+
"mimetype": "text/x-python",
142+
"name": "python",
143+
"nbconvert_exporter": "python",
144+
"pygments_lexer": "ipython3",
145+
"version": "3.9.12"
146+
},
147+
"orig_nbformat": 4,
148+
"vscode": {
149+
"interpreter": {
150+
"hash": "daee99e6893c0f9b4fa2cee7c11289a4ac1788238c3c1d2caa83921531d37465"
151+
}
152+
}
153+
},
154+
"nbformat": 4,
155+
"nbformat_minor": 2
156+
}

Readme.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Topic Includes
44

5-
Strings-
5+
>#### Strings-
66
A string value is a collection of one and more characters put in single , double , triple quotes.
77

8-
Operators-
9-
operators are use to perform operation on variables and values.
10-
1.Arithmetic Operators
11-
2.comparison Operators
12-
3.Assignment Operators
13-
4.Logical Operators
14-
5.Bitwise Operators
15-
6.Membership Operators
16-
7.Identity Operators
8+
>#### Operators-
9+
> operators are use to perform operation on variables and values.
10+
> - 1.Arithmetic Operators
11+
> - 2.comparison Operators
12+
> - 3.Assignment Operators
13+
> - 4.Logical Operators
14+
> - 5.Bitwise Operators
15+
> - 6.Membership Operators
16+
> - 7.Identity Operators

python-practices.ipynb

Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4667,29 +4667,109 @@
46674667
},
46684668
{
46694669
"cell_type": "code",
4670-
"execution_count": 6,
4670+
"execution_count": 1,
4671+
"metadata": {},
4672+
"outputs": [
4673+
{
4674+
"ename": "NameError",
4675+
"evalue": "name 'count' is not defined",
4676+
"output_type": "error",
4677+
"traceback": [
4678+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
4679+
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
4680+
"\u001b[1;32md:\\Python\\python_practice\\python-practices.ipynb Cell 149\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> <a href='vscode-notebook-cell:/d%3A/Python/python_practice/python-practices.ipynb#Y301sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m \u001b[39mprint\u001b[39m(count,\u001b[39m'\u001b[39m\u001b[39mletters found\u001b[39m\u001b[39m'\u001b[39m)\n",
4681+
"\u001b[1;31mNameError\u001b[0m: name 'count' is not defined"
4682+
]
4683+
}
4684+
],
4685+
"source": [
4686+
"print(count,'letters found')"
4687+
]
4688+
},
4689+
{
4690+
"cell_type": "code",
4691+
"execution_count": 2,
4692+
"metadata": {},
4693+
"outputs": [],
4694+
"source": [
4695+
"#functions\n",
4696+
"#simple function\n",
4697+
"def hello():\n",
4698+
" print('hello function')\n"
4699+
]
4700+
},
4701+
{
4702+
"cell_type": "code",
4703+
"execution_count": 3,
4704+
"metadata": {},
4705+
"outputs": [
4706+
{
4707+
"data": {
4708+
"text/plain": [
4709+
"function"
4710+
]
4711+
},
4712+
"execution_count": 3,
4713+
"metadata": {},
4714+
"output_type": "execute_result"
4715+
}
4716+
],
4717+
"source": [
4718+
"type(hello)"
4719+
]
4720+
},
4721+
{
4722+
"cell_type": "code",
4723+
"execution_count": 5,
4724+
"metadata": {},
4725+
"outputs": [
4726+
{
4727+
"data": {
4728+
"text/plain": [
4729+
"'hello'"
4730+
]
4731+
},
4732+
"execution_count": 5,
4733+
"metadata": {},
4734+
"output_type": "execute_result"
4735+
}
4736+
],
4737+
"source": [
4738+
"hello.__name__"
4739+
]
4740+
},
4741+
{
4742+
"cell_type": "code",
4743+
"execution_count": 7,
4744+
"metadata": {},
4745+
"outputs": [],
4746+
"source": [
4747+
"a='hello'"
4748+
]
4749+
},
4750+
{
4751+
"cell_type": "code",
4752+
"execution_count": 8,
46714753
"metadata": {},
46724754
"outputs": [
46734755
{
46744756
"name": "stdout",
46754757
"output_type": "stream",
46764758
"text": [
4677-
"0 letters found\n"
4759+
"hello\n"
46784760
]
46794761
}
46804762
],
46814763
"source": [
4682-
"print(count,'letters found')"
4764+
"print(a)"
46834765
]
46844766
},
46854767
{
46864768
"cell_type": "code",
46874769
"execution_count": null,
46884770
"metadata": {},
46894771
"outputs": [],
4690-
"source": [
4691-
"#"
4692-
]
4772+
"source": []
46934773
}
46944774
],
46954775
"metadata": {

0 commit comments

Comments
 (0)