1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-12-15 23:10:58 +01:00
parent 6fd225e26b
commit 0233fb9ede

View File

@ -1,3 +1,28 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
class DimensionError(Exception):
def __init__(self):
super().__init__(self)
self.msg = 'Błąd !!!'
class Point():
def __int__(self,wspolrzedne):
if self.isNumeric(wspolrzedne):
self.wspolrzedne = wspolrzedne
else:
self.wspolrzedne = None
def isNumeric(x):
for i in range(len(x)):
if isinstance(x[i], (int, float)) == False:
return False
return True
pkt1 = Point([1, 1, 1])
pkt2 = Point([3, 3, 3])