User Input

Joshua Landau joshua.landau.ws at gmail.com
Thu May 30 11:09:12 EDT 2013


On 30 May 2013 15:47, Eternaltheft <eternaltheft at gmail.com> wrote:
>> And perhaps you meant for your function to CALL drawBoard(), rather than
>> returning the function object drawBoard.
>>
>> DaveA
>
> do you think it would be better if i call drawBoard?

Please read http://www.catb.org/esr/faqs/smart-questions.html, or
anything similar you can find.

Start from the beginning.

1) What are you doing? Not "what are you doing now" but, from the top,
what is the goal you are trying to achieve?

2) How have you tried to do it? Code  would be nice here too, but
don't just send really large blocks of irrelevant code. For example, your
"drawBoard" function would be better surmised as:

def drawBoard(b):
    Turtle.speed(0)
    Turtle.up()
    Turtle.goto(-4 * b, 4 * b)
    Turtle.down()

    for i in range (8):
        Turtle.forward(b)
        Turtle.right(90)
        ... # etc, drawing a board

3) What are you stuck on? In this case, you are stuck on what to do
after you call input("stuff"), if I understand. What do you want to do
- not "how do you want to do it" but what is it that you are doing?

4) Finally, we should understand what calling drawBoard is for. Ask us
again and we'll be much more likely to give good answers.



More information about the Python-list mailing list