Skip to content

Commit

Permalink
Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjanaPurbia authored Jul 24, 2021
1 parent 0a2c8ec commit e14bc1e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions para-constroctor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class employee:
count = 0
def __init__(self,name,sal):
self.name=name
self.sal=sal
employee.count += 1

emp1=employee("sanjana",50000)
emp2=employee("sonu",35000)
emp=employee("sanjana",50000)
emp3=employee("sonu",35000)

print("{} has salary {}".format(emp1.name,emp1.sal))
print("{} has salary {}".format(emp.name,emp.sal))
print("{} has salary {}".format(emp2.name,emp2.sal))
print("{} has salary {}".format(emp3.name,emp3.sal))
print("total no of employee= ",employee.count)

0 comments on commit e14bc1e

Please sign in to comment.