How to Draw a triangle shape in python? -


I want to draw a triangle using python. I've already drawn the shape of the circle but I can not drag the triangle. Can anyone please help me with this?

This is my code for the circle and I want to use the same type of code for the triangle. I

  Import Graphics Random Win = Import Graphics. In the range I (1000): x = random.randint (0,500) y = random.randint (0,500) z = random.randint (1,100) point in graphin ("exercise 7", 500,500) win.setBackground ("white") = Graphics. Point (x, y) circle = graphics Circle (dot, jade) color = graphics color_rgb (random.randint (0,255), random.randint (0,255), random.randint (0,255) circle.setFill (color) circle.draw (win) win.getMouse () win.close ()   

Thanks! <

This should be a triangle, with a random corner (corner):

  

I hope it helps.

Comments

Popular posts from this blog

c# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -