Commit Graph

5 Commits

Author SHA1 Message Date
e3aad40d1d Update point.py
Remove type checking and make an overwritten operator from method str()
2020-03-10 08:35:45 +01:00
5fc13e0e07 Fix method set_y 2020-03-09 20:14:39 +01:00
2d4ee80b4c Move set_random() out of class
As generating a random Point is mostly not used on an existing object,
the method is now an independent function get_random() instead of a
class method.
2020-03-09 18:42:46 +01:00
Pascal Lais
6f83b57ffb Add sort function and class methods to class Point
The sort function takes a list of Point objects and sorts them either
by their x or y coordinate using merge sort.
Also added a method set_random, that sets the coordinates to random
values and a method str, that returns the coordinates as string.
2020-03-09 07:48:07 +01:00
Pascal Lais
a14f96ab2a Add point module
The point module defines a Point class, that displays a Point in a
two-dimensional coordinate system. An object of the class contains a x-
and y-coordinate and a setter and getter method for each at this point.
2020-03-08 10:57:40 +01:00