79582809

Date: 2025-04-19 20:30:03
Score: 0.5
Natty:
Report link

Anyone who is having any problems I have a code that might be helpful. This is what I have so far.

from graphics import * 
def graphics():
    
    graphics()

# Title, Width, Height 


win = GraphWin("Example", 200, 200)
win.setBackground("red")

p1 = Point(100,100)
p1.setFill("blue")
p1.draw(win)


p1 = win.getMouse()
p2 = win.getMouse()



# Rectangle - Top-left and bottom-right 
rect = Rectangle(p1,p2)
rect.setFill("orange")
rect.setOutline("purple")
rect.draw(win)

# Circle - 2 Points - Top-left bottom-right of "rectangle"
from graphics import *

def main():
    win = GraphWin("My Circle", 100, 100)
    c = Circle(p1,p2)
    c = Circle(Point(50,50), 10)
    c.draw(win)
    win.getMouse() # Pause to view result
    win.close()    # Close window when done

main()


Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Darsh