-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a2c8ec
commit e14bc1e
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |