User Profile

Collapse

Profile Sidebar

Collapse
cid11
cid11
Last Activity: Jul 23 '10, 03:04 PM
Joined: Jun 17 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cid11
    replied to Circles help please
    I have managed to dorrect the first problem by changing the loop around.. but If someone could help me with the second one please..
    See more | Go to post

    Leave a comment:


  • cid11
    started a topic Circles help please

    Circles help please

    atlast I have managed to get some working code but the first problem is that I have is taht.. when I call draw(2,4) I have a column of 2 circles and 4 rows and I would actually like it to be a clomun of 2 and row of 4. Secodly although my code works I have a main function and an input for an colour how could I fill the circles with the requested colour?

    like
    This is what i currently have
    00
    00
    00
    ...
    See more | Go to post

  • cid11
    replied to circle loop?
    for the size of the graphic window.. would it be

    size of the window - ((number of circles + 1) * spacing)) / number of circles
    See more | Go to post

    Leave a comment:


  • cid11
    replied to circle loop?
    So the length and height are to calculate the size of the graphic window according to the number of circles required? could I use the if and else from the previous code I gave? and do I keep my orignal code and add code to it and remove and add?

    thx
    See more | Go to post

    Leave a comment:


  • cid11
    replied to circle loop?
    yup i kinda understand what a for loop is.. but a bit rusty on python as i am retaking a module and had studied it in sept and just learned java.. what exactly would I have to do? to complete what i want the program to do?

    thx
    See more | Go to post

    Leave a comment:


  • cid11
    replied to circle loop?
    so wht does the sample code u gave do?...
    See more | Go to post

    Leave a comment:


  • cid11
    replied to circle loop?
    sorry i posted in a hurry so none of tht make sense...it works but not the way i want it to.. now it does concentric circles.. but i want it to have seperate circles as i have tried to show below.. any help would be appreciated..

    00000(all red)
    00000(all white)
    00000(all red)
    00000(all white)
    See more | Go to post

    Leave a comment:


  • cid11
    started a topic circle loop?

    circle loop?

    I am trying to make some code which creates 5 set of circles. But this is the best i could do

    00000(all red)
    00000(all white)
    00000(all red)
    00000(all white)

    Code:
    from graphics import *
    
    def main():
        win = GraphWin("My Circle", 300, 300)
        # count backwards
        for k in range(6, 1, -1):
            c = Circle(Point(150,150), 20*k)
            # alternate
    ...
    See more | Go to post

  • cid11
    replied to graphics.py circle loop?
    I want 25 circles.. so would the range be

    for i in range(25):

    but how could I execute the function for it being filled with red or not? I mean the if and else function?
    See more | Go to post

    Leave a comment:


  • cid11
    started a topic graphics.py circle loop?

    graphics.py circle loop?

    how could I loop this to repeat the circles with one circle filled with red colour and one without?

    from graphics import *

    Code:
     
    w = 300
    h = 300
    win = GraphWin("Red Circle", w, h)
    
    
    center = Point(150, 150)
    radius = 80
    circle = Circle(center, radius)
    circle.setFill('red')
    circle.setWidth(2)
    circle.draw(win)
    
    
    win.getMouse()
    ...
    See more | Go to post
No activity results to display
Show More
Working...