graphics - How do you add co-ordinates in python? -


So I am trying to create a function that allows the user to enter the length and width and dragon for a rectangle Drag the rectangle (using the graphics module) in the center of the graph. So I was thinking that you can add coordination as a way to get an error message. This is what I have so far received:

  def drawRectangle (): win = graphfin ('target', 200,200) win.setCoords (0,0,200,200) width = int (input ( 'Enter the width of your rectangle:')) Length = int (Input ('Enter the length of your rectangle:')) ** Top lift = point (100,100) + point (0, width / 2) -Pivot (length / 2, 0) Right = point down (100,100) -Point (0, width / 2) + point (length / 2,0) ** REC = rectangle (point left (top left.x, top left), point (Right below. 

I have put in between the two stars that the bit is messing

the help will be greatly appreciated

Since dot belongs to another class, so you have to type your function, add a series of digits .

You can try it, but I do not know it will break something (though I would be surprised, because it looks like + Points : < / P>

Use it for Try not to add before digit :

  graphics import * p1 = point (1,2) p2 = point (before 3,4) DEF edpoints (self, others): Return points (self x. other. X, self e. other. Addpoints for the point in the point of view in the point of view of print point "" (% i,% i) "% (point.x, point.y)  

gives:

  (1, 2) (3, 4) (4, 6)  

it can work, but I have not tested it. If this works, you can also redefine other functions.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -