Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'table.': 0.07; 'turtle': 0.07; 'filename': 0.09; 'function:': 0.09; 'used.': 0.09; 'def': 0.12; 'lambda': 0.16; 'say.': 0.16; 'statement.': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'user.': 0.19; 'meant': 0.20; 'input': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'defined': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'am,': 0.29; "doesn't": 0.30; 'object.': 0.31; 'supposed': 0.32; 'sense': 0.34; "can't": 0.35; 'board': 0.35; 'something': 0.35; 'but': 0.35; 'returning': 0.36; 'doing': 0.36; 'initially': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'that,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'how': 0.40; 'hope': 0.61; 'range': 0.61; "you're": 0.61; 'show': 0.63; 'more': 0.64; 'received:74.208': 0.68; 'draws': 0.84; 'received:74.208.4.194': 0.84 Date: Thu, 30 May 2013 09:37:56 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-list@python.org Subject: Re: User Input References: <2eaa39b8-9e87-402a-b0c0-8c8c5d42fed7@googlegroups.com> In-Reply-To: <2eaa39b8-9e87-402a-b0c0-8c8c5d42fed7@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:mT5J2R2RYuIbmg15us1i2S8ce5o8j9AfVZy7cAHn3H/ aooUza3AlFvvOzVU1saAOHHgXrdoci3Cq96LSGRKRPmH8AYIww c2B+E25kO3EKo0Bq4w5Ph1RFwYM8HLK8QySMBZVOvMvyCuwXnG DoOdvM8mHHUI9EoQmGLdHYAjfACKZbhRC5IlY7rcTsUZ2iLFB3 1YWyVV1sRiY1sbozz+NLld9Kp480ejDnT62fPfzkoERqs4p7YB tYEeRLFQ4VKw3fEjKARbXVcTvcUA7hCKLmxB1OPwO+FVBVC4pH VZpVVtGW93RsDSGTMM2qrYRQjbK7tHjCLUo6eHB2K1WkH0rgaO V5VMnVGnPGcsRFc9/AJA= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 168 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369921090 news.xs4all.nl 15933 [2001:888:2000:d::a6]:40048 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46493 On 05/30/2013 09:10 AM, Eternaltheft wrote: > yeah i found out why it wasn't defined before because i tried to put it into a function. That's not a sentence, and it doesn't make sense in any permutation I can do on it. > > this is my drawBoard function: > > import turtle as Turtle > Turtle.title("Checkers") > b = 75 > > 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) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > > for i in range (1): > Turtle.right(90) > Turtle.forward(b*2) > Turtle.right(90) > > for i in range(8): > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > > for i in range(1): > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > > for i in range (8): > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > > for i in range (1): > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > > for i in range(8): > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > > for i in range(1): > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > > for i in range (8): > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > > for i in range (1): > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > > for i in range(8): > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > > for i in range(1): > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > > for i in range (8): > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > Turtle.left(90) > Turtle.forward(b) > > for i in range (1): > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > > for i in range(8): > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > Turtle.right(90) > Turtle.forward(b) > > > drawBoard(b) > > Turtle.done() > > it draws an 8x8 board table. > > what i initially wanted to do was to return this function if nothing was inputted from the user. i hope that makes more sense :S > It makes sense if you're also returning a function object when the user does have something to say. But I can't see how you might be doing that, unless you're using a lambda to make up a custom function object. And you still don't show us the function that contains this input statement. Nor how it gets used. Is the user supposed to supply a value for b, and you put it in a variable called filename ? And perhaps you meant for your function to CALL drawBoard(), rather than returning the function object drawBoard. -- DaveA