class v(object):
    def __init__(self, coor):
        try:
            if not coor:
                raise ValueError
            self.coor = list(coor)
            self.dim = len(coor)

        except KeyboardInterrupt:
            raise
        except ValueError:
            raise ValueError('The co-ordinates must contain values')
        except TypeError:
            raise TypeError('The co-ordinates must be an iterable')

    # Called when converting to string or printing
    def __str__(self):
        return 'Vector: ' + str(self.coor)

    # Checking for equality
    def __eq__(self, ov):
        return self.coor == ov.coor

    # Addition

    def plus_vector(self, ov):
        assert self.dim == ov.dim, 'Vectors must be the same dimensionality.'
        return v([x + y for x, y in zip(self.coor, ov.coor)])

    def plus_scalar(self, c):
        return v([x + c for x in self.coor])

    def __add__(self, o):
        if type(o) in [int, float]:
            return self.plus_scalar(o)
        elif type(o) is v:
            return self.plus_vector(o)
        else:
            return NotImplemented

    def __radd__(self, o):
        return self.__add__(o)

    # Subtraction

    def minus_vector(self, ov):
        assert self.dim == ov.dim, 'Vectors must be the same dimensionality.'
        return v([x - y for x, y in zip(self.coor, ov.coor)])

    def minus_scalar(self, c):
        return v([x - c for x in self.coor])

    def rminus_vector(self, ov):
        assert self.dim == ov.dim, 'Vectors must be the same dimensionality.'
        return v([y - x for x, y in zip(self.coor, ov.coor)])

    def rminus_scalar(self, c):
        return v([c - x for x in self.coor])

    def __sub__(self, o):
        if type(o) in [int, float]:
            return self.minus_scalar(o)
        elif type(o) is v:
            return self.minus_vector(o)
        else:
            return NotImplemented

    def __rsub__(self, o):
        if type(o) in [int, float]:
            return self.minus_scalar(o)
        elif type(o) is v:
            return self.minus_vector(o)
        else:
            return NotImplemented

    # Multiplication

    def times_scalar(self, c):
        return v([c * x for x in self.coor])

    def times_vector(self, ov):
        assert self.dim == ov.dim, 'Vectors must be the same dimensionality.'
        return v([x * y for x, y in zip(self.coor, ov.coor)])

    def __mul__(self, o):
        if type(o) in [int, float]:
            return self.times_scalar(o)
        elif type(o) is v:
            return self.times_vector(o)
        else:
            return NotImplemented

    def __rmul__(self, o):
        return self.__mul__(o)

@@ -1,8 +1,32 @@
+from math import floor%0A%0A
 class v(
@@ -561,24 +561,79 @@
 self.coor)%0A%0A
+    def __repr__(self):%0A        return self.__str__()%0A%0A
     # Checki
@@ -716,16 +716,17 @@
 r%0A%0A    #
+#
  Additio
@@ -1256,16 +1256,17 @@
 )%0A%0A    #
+#
  Subtrac
@@ -2070,32 +2070,33 @@
     return self.
+r
 minus_scalar(o)%0A
@@ -2138,32 +2138,33 @@
     return self.
+r
 minus_vector(o)%0A
@@ -2217,16 +2217,17 @@
 d%0A%0A    #
+#
  Multipl
@@ -2288,13 +2288,13 @@
  v(%5B
-c * x
+x * c
  for
@@ -2757,12 +2757,1347 @@
 .__mul__(o)%0A
+%0A    ## True divison%0A%0A    def truediv_scalar(self, c):%0A        return v(%5Bx / c for x in self.coor%5D)%0A%0A    def truediv_vector(self, ov):%0A        assert self.dim == ov.dim, 'Vectors must be the same dimensionality.'%0A        return v(%5Bx / y for x, y in zip(self.coor, ov.coor)%5D)%0A%0A    def __truediv__(self, o):%0A        if type(o) in %5Bint, float%5D:%0A            return self.truediv_scalar(o)%0A        elif type(o) is v:%0A            return self.truediv_vector(o)%0A        else:%0A            return NotImplemented%0A%0A    def rtruediv_scalar(self, c):%0A        return v(%5Bc / x for x in self.coor%5D)%0A%0A    def rtruediv_vector(self, ov):%0A        assert self.dim == ov.dim, 'Vectors must be the same dimensionality.'%0A        return v(%5By / x for x, y in zip(self.coor, ov.coor)%5D)%0A%0A    def __rtruediv__(self, o):%0A        if type(o) in %5Bint, float%5D:%0A            return self.rtruediv_scalar(o)%0A        elif type(o) is v:%0A            return self.rtruediv_vector(o)%0A        else:%0A            return NotImplemented%0A%0A    ## Floor division%0A%0A    def __floordiv__(self, o):%0A        if type(o) in %5Bint, float, v%5D:%0A            return v(%5Bfloor(x) for x in self.__truediv__(o).coor%5D)%0A        else:%0A            return NotImplemented%0A%0A    def __rfloordiv__(self, o):%0A        if type(o) in %5Bint, float, v%5D:%0A            return v(%5Bfloor(x) for x in self.__rtruediv__(o).coor%5D)%0A

Add division