Skip to content

Commit c8f7d29

Browse files
committedFeb 9, 2020
Hierchical In
1 parent 4bd8a8e commit c8f7d29

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
 
+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 27,
6+
"metadata": {},
7+
"outputs": [
8+
{
9+
"name": "stdout",
10+
"output_type": "stream",
11+
"text": [
12+
"Overring : Soumyadip Chowdhury Soumyadip.Chowdhury@python.com 700000 Python\n",
13+
"Overring : Soumyadip Chowdhury Soumyadip.Chowdhury@python.com 900000 JAVA\n",
14+
"Help on class Developer in module __main__:\n",
15+
"\n",
16+
"class Developer(Employee)\n",
17+
" | Developer(f, l, p, lang)\n",
18+
" | \n",
19+
" | Method resolution order:\n",
20+
" | Developer\n",
21+
" | Employee\n",
22+
" | builtins.object\n",
23+
" | \n",
24+
" | Methods defined here:\n",
25+
" | \n",
26+
" | __init__(self, f, l, p, lang)\n",
27+
" | Initialize self. See help(type(self)) for accurate signature.\n",
28+
" | \n",
29+
" | print(self)\n",
30+
" | \n",
31+
" | ----------------------------------------------------------------------\n",
32+
" | Data descriptors inherited from Employee:\n",
33+
" | \n",
34+
" | __dict__\n",
35+
" | dictionary for instance variables (if defined)\n",
36+
" | \n",
37+
" | __weakref__\n",
38+
" | list of weak references to the object (if defined)\n",
39+
"\n",
40+
"None\n"
41+
]
42+
}
43+
],
44+
"source": [
45+
"class Employee:\n",
46+
" \n",
47+
" def __init__(self,f ,l ,p ):\n",
48+
" self.first=f\n",
49+
" self.last=l\n",
50+
" self.email=f+\".\"+l+\"@python.com\"\n",
51+
" self.pay=p\n",
52+
" \n",
53+
" def print(self):\n",
54+
" return \"{} {} {} {}\".format(self.first,self.last,self.email,self.pay)\n",
55+
"\n",
56+
" \n",
57+
"class Developer(Employee):\n",
58+
" def print(self):\n",
59+
" return \"Overring : {} {} {} {} {}\".format(self.first,self.last,self.email,self.pay,self.lang)\n",
60+
" \n",
61+
" def __init__(self,f ,l ,p ,lang ):\n",
62+
" super().__init__(f,l,p)\n",
63+
" self.lang=lang\n",
64+
" \n",
65+
"dev_1=Developer(\"Soumyadip\",\"Chowdhury\",700000,\"Python\")\n",
66+
"dev_2=Developer(\"Soumyadip\",\"Chowdhury\",900000,\"JAVA\")\n",
67+
"print(dev_1.print())\n",
68+
"print(dev_2.print())\n",
69+
"print(help(Developer))"
70+
]
71+
}
72+
],
73+
"metadata": {
74+
"kernelspec": {
75+
"display_name": "Python 3",
76+
"language": "python",
77+
"name": "python3"
78+
},
79+
"language_info": {
80+
"codemirror_mode": {
81+
"name": "ipython",
82+
"version": 3
83+
},
84+
"file_extension": ".py",
85+
"mimetype": "text/x-python",
86+
"name": "python",
87+
"nbconvert_exporter": "python",
88+
"pygments_lexer": "ipython3",
89+
"version": "3.7.4"
90+
}
91+
},
92+
"nbformat": 4,
93+
"nbformat_minor": 4
94+
}

0 commit comments

Comments
 (0)
Failed to load comments.