Skip to content

Commit 943a48c

Browse files
committedMay 11, 2020
Update Employee Print Object.ipynb
1 parent 01ae855 commit 943a48c

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed
 

‎Employee Print Object.ipynb

+8-18
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,16 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 19,
5+
"execution_count": 8,
66
"metadata": {},
77
"outputs": [
88
{
99
"name": "stdout",
1010
"output_type": "stream",
1111
"text": [
1212
"Soumyadip Chowdhury Soumyadip.Chowdhury@python.com 900000\n",
13-
"Soumyadip Chowdhury Soumyadip.Chowdhury@python.com 100000\n"
14-
]
15-
},
16-
{
17-
"ename": "TypeError",
18-
"evalue": "print() missing 1 required positional argument: 'self'",
19-
"output_type": "error",
20-
"traceback": [
21-
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
22-
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
23-
"\u001b[1;32m<ipython-input-19-b7dac7318036>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 15\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0memp_1\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 16\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0memp_2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 17\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mEmployee\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 18\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mEmployee\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0memp_2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
24-
"\u001b[1;31mTypeError\u001b[0m: print() missing 1 required positional argument: 'self'"
13+
"Bristi Biswas Bristi.Biswas@python.com 100000\n",
14+
"True\n"
2515
]
2616
}
2717
],
@@ -36,14 +26,14 @@
3626
" \n",
3727
" def print(self):\n",
3828
" return \"{} {} {} {}\".format(self.first,self.last,self.email,self.pay)\n",
39-
" \n",
40-
" \n",
29+
" \n",
30+
"\n",
4131
"emp_1=Employee(\"Soumyadip\",\"Chowdhury\",900000)\n",
42-
"emp_2=Employee(\"Soumyadip\",\"Chowdhury\",100000)\n",
32+
"emp_2=Employee(\"Bristi\",\"Biswas\",100000)\n",
4333
"print(emp_1.print())\n",
4434
"print(emp_2.print())\n",
45-
"print(Employee.print(emp_1))\n",
46-
"print(Employee.print(emp_2))"
35+
"\n",
36+
"print(isinstance(emp_1,Employee))"
4737
]
4838
}
4939
],

0 commit comments

Comments
 (0)
Failed to load comments.