Nick Funchion
Nick Funchion

Reputation: 31

how do I make a rectangle in python?

How do I make a rectangle with Height and Width parameters, using the graphics package in python?

Rectangle(RecWidth,RecField);

Upvotes: 0

Views: 20243

Answers (1)

101
101

Reputation: 8989

According to the docs

from graphics import *
win = GraphWin() 
rect = Rectangle(Point(20, 10), Point(10, 20))
rect.draw(win)

Upvotes: 1

Related Questions