Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions 01-challenge-problem.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
class Point:
class point:
def __init__(self, coordX, coordY):
self.coordX = coordX
self.coordY = coordY


class Rectangle:
def __init__(self, starting_point, broad, high):
def __init__(self, starting_point, width, height):
self.starting_point = starting_point
self.broad = broad
self.high = high
self.width = width
self.height = height

def area(self):
return self.broad * self.high
return self.width * self.height

def end_points(self):
top_right = self.starting_point.coordX + self.broad
Expand All @@ -22,14 +22,14 @@ def end_points(self):
print('End Point Y-Axis (Bottom Left): ' + str(bottom_left))


def build_stuff():
def coordinates():
main_point = Point(50, 100)
rect = Rectangle(main_point, 90, 10)

return rect


my_rect = build_stuff()
my_rect = coordinates()

print(my_rect.area())
my_rect.end_points()