1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-12-03 18:10:30 +01:00
parent f372aff821
commit a0d2623f9f

View File

@ -1,3 +1,20 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
class Employee:
id_prac = 1
def __init__ (self,imie, nazwisko):
self.imie = imie
self.nazwisko = nazwisko
self.id_prac = Employee.id_prac
Employee.id_prac += 1
def get_id (self):
return self.id_prac
prac1 = Employee("X1","Y1")
prac2 = Employee("X2","Y2")
print(prac1.get_id())
print(prac2.get_id())