python graphics problem help pls?? how do i create this in python?

Discussion in 'Python' started by PythonisaNightmare, Dec 1, 2014.

  1. PythonisaNightmare

    PythonisaNightmare

    Joined:
    Dec 1, 2014
    Messages:
    1
    Likes Received:
    0
    from graphics import*

    def penultimatePatch():

    win =GraphWin("Patch1",100,100)
    amountOfCircles =5

    #Filled Red Circles
    fillCircle =Circle(Point(20,20)+100/amountOfCircles)
    fillCircle.draw(win)
    fillCircle.setFill("red")

    #Verticle white rectangles
    rectangleVerticle1 =Rectangle(Point(0,0),Point(10,100))
    rectangleVerticle1.setFill("white")
    rectangleVerticle1.setOutline("white")
    rectangleVerticle1.draw(win)

    rectangleVerticle2 =Rectangle(Point(41,0),Point(51,100))
    rectangleVerticle2.setFill("white")
    rectangleVerticle2.setOutline("white")
    rectangleVerticle2.draw(win)

    rectangleVerticle3 =Rectangle(Point(81,0),Point(91,100))
    rectangleVerticle3.setFill("white")
    rectangleVerticle3.setOutline("white")
    rectangleVerticle3.draw(win)

    #Horizontal white rectangles
    rectangleHorizontal =Rectangle(Point(21,11),Point(41,21))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(61,11),Point(81,21))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(21,31),Point(51,41))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(81,31),Point(61,41))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(21,51),Point(51,61))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(61,51),Point(91,61))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(21,71),Point(51,81))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(61,71),Point(81,81))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(21,91),Point(51,100))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    rectangleHorizontal =Rectangle(Point(61,91),Point(91,100))
    rectangleHorizontal.setFill("white")
    rectangleHorizontal.setOutline("white")
    rectangleHorizontal.draw(win)

    #Outlined Red circles
    fillCircle =Circle(Point(20,20)+100/amountOfCircles)
    fillCircle.draw(win)
    fillCircle.setOutline("red")
     

    Attached Files:

    PythonisaNightmare, Dec 1, 2014
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Paul Fi

    I have this problem, pls help!

    Paul Fi, Oct 17, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    639
    Paul Fi
    Oct 18, 2004
  2. Kapil Shah via DotNetMonster.com

    Crystal Report with parameter problem -Pls help

    Kapil Shah via DotNetMonster.com, Mar 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    714
    Elton Wang
    Mar 3, 2005
  3. James Bond
    Replies:
    0
    Views:
    880
    James Bond
    Aug 3, 2004
  4. Rit
    Replies:
    0
    Views:
    526
  5. zheetee@gmail.com

    adding data...got problem....pls help

    zheetee@gmail.com, Apr 23, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    921
    Jeff Dillon
    May 17, 2006
  6. Rahul S.
    Replies:
    3
    Views:
    924
    Flash Gordon
    Nov 1, 2004
  7. weepeez@gmail.com
    Replies:
    1
    Views:
    620
    RedGrittyBrick
    Jan 2, 2008
  8. Emiliano
    Replies:
    2
    Views:
    685
    Rajesh.V
    Oct 16, 2003
Loading...