1
0
forked from tdwojak/Python2017
Python2017/labs04/task03.py
2017-12-15 23:10:58 +01:00

29 lines
566 B
Python

#!/usr/bin/env python2
# -*- 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])