Skip to content

Commit 337c97e

Browse files
committed
Manager
1 parent 443b10c commit 337c97e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Employee Hierarchical Inheritance.ipynb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 16,
5+
"execution_count": 18,
66
"metadata": {},
77
"outputs": [
88
{
9-
"ename": "SyntaxError",
10-
"evalue": "invalid syntax (<ipython-input-16-e7a8f434ca87>, line 26)",
11-
"output_type": "error",
12-
"traceback": [
13-
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-16-e7a8f434ca87>\"\u001b[1;36m, line \u001b[1;32m26\u001b[0m\n\u001b[1;33m for x in self.employees\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
9+
"name": "stdout",
10+
"output_type": "stream",
11+
"text": [
12+
"Developer Overring : Soumyadip Chowdhury [email protected] 700000 Python\n",
13+
"Developer Overring : Soumyadip Chowdhury [email protected] 900000 JAVA\n",
14+
"Manager Overring : Soumyadip Chowdhury [email protected] 700000 <__main__.Developer object at 0x000001EFA8D0BC08>\n"
1415
]
1516
}
1617
],
@@ -40,9 +41,9 @@
4041
"class Manager(Employee):\n",
4142
" \n",
4243
" def print(self):\n",
43-
" for x in self.employees \n",
44+
" for x in self.employees:\n",
4445
" print(x)\n",
45-
" return \"Manager Overring : {} {} {} {} {}\".format(self.first,self.last,self.email,self.pay,self.employees)\n",
46+
" print(\"Manager Overring : {} {} {} {} {}\".format(self.first,self.last,self.email,self.pay,self.employees)\n",
4647
" \n",
4748
" def __init__(self,f ,l ,p ,employees=None ):\n",
4849
" super().__init__(f,l,p)\n",

0 commit comments

Comments
 (0)