Ok i am having a little trouble trying to figure out how to pull the x-cordinate from p1 and p2 so that i can use it later in the code to build a door.
# This is a program to build a house in five clicks
from graphics import *
def main():
win = GraphWin("house.py", 400, 300)
win.setCoords(0,0, 4,3)
p1 = win.getMouse()
p2 = win.getMouse()
house = Rectangle(p1, p2)
house.setFill("red")
house.draw(win)
win.getMouse()
win.close()
main()