Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66873
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <swdunning@cox.net> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.034 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'parameters': 0.04; '21,': 0.07; 'see.': 0.07; 'variables': 0.07; 'subject:help': 0.08; 'messing': 0.09; 'parameter': 0.09; 'subject:Function': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; 'wrote': 0.14; 'color.': 0.16; 'somewhere.': 0.16; 'star.': 0.16; 'subject:turtle': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'bit': 0.19; 'trying': 0.19; 'received:10.0.1': 0.19; 'starts': 0.20; 'feb': 0.22; '>>>': 0.22; 'programming': 0.22; '(in': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; '<div': 0.24; 'color,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'help!': 0.26; 'suggested': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'change,': 0.30; 'work.': 0.31; 'that.': 0.31; 'says': 0.33; 'ago': 0.33; 'something': 0.35; 'but': 0.35; 'right?': 0.36; 'doing': 0.36; 'thanks': 0.36; 'received:10.0': 0.36; 'should': 0.36; 'wrong': 0.37; 'so,': 0.37; 'skip:- 20': 0.37; 'received:10': 0.37; 'auto;': 0.38; 'ends': 0.38; 'star': 0.38; 'whatever': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'help,': 0.39; 'sure': 0.39; 'changed': 0.39; 'called': 0.40; 'how': 0.40; 'days': 0.60; 'dave': 0.60; 'black': 0.61; 'color': 0.61; 'lost': 0.61; 'new': 0.61; 'making': 0.63; 'header:Message-Id:1': 0.63; 'became': 0.64; 'charset:windows-1252': 0.65; 'yes': 0.68; '15px;': 0.68; '20,': 0.68; 'sound': 0.68; 'walk': 0.74; 'filling': 0.78; '2014,': 0.84; 'bare': 0.84; 'red.': 0.84; 'shape.': 0.84; 'absolutely': 0.87; '0px;">': 0.91; 'angel': 0.91; 'scott': 0.93 |
| X-CT-Class | Clean |
| X-CT-Score | 0.00 |
| X-CT-RefID | str=0001.0A020206.53081B9E.004D,ss=1,re=0.000,fgs=0 |
| X-CT-Spam | 0 |
| X-Authority-Analysis | v=2.0 cv=H/cFNZki c=1 sm=1 a=MB85R812cvcrhCHz/P2OVA==:17 a=G8Uczd0VNMoA:10 a=kviXuzpPAAAA:8 a=l_aXpHVjmqQA:10 a=EsSkKGVBSmiBsIcWjwwA:9 a=pILNOxqGKmIA:10 a=4vB-4DCPJfMA:10 a=M863-sWyYjSFvpt9g4cA:9 a=_W_S_7VecoQA:10 a=ZJCZYjxfiXwA:10 a=MB85R812cvcrhCHz/P2OVA==:117 |
| X-CM-Score | 0.00 |
| Authentication-Results | cox.net; auth=pass (PLAIN) smtp.auth=swdunning@cox.net |
| Content-Type | multipart/alternative; boundary="Apple-Mail=_AD206F8B-74B4-4A30-AF2A-9D64072D8FD6" |
| Mime-Version | 1.0 (Mac OS X Mail 7.1 \(1827\)) |
| Subject | Re: Function and turtle help |
| From | Scott W Dunning <swdunning@cox.net> |
| In-Reply-To | <VEC21n00t3bjUJS01EC4BR> |
| Date | Fri, 21 Feb 2014 20:38:02 -0700 |
| References | <75339005-9609-48D8-9DEF-EF0B0CEE7B39@cox.net> <UuUh1n00f3bjUJS01uUiDR> <BBBC49EA-CB3E-4FBA-AB9C-887B6F5FFE2A@cox.net> <VEC21n00t3bjUJS01EC4BR> |
| To | Dave Angel <davea@davea.name> |
| X-Mailer | Apple Mail (2.1827) |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7251.1393041974.18130.python-list@python.org> (permalink) |
| Lines | 147 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1393041974 news.xs4all.nl 2834 [2001:888:2000:d::a6]:52289 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:66873 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Feb 21, 2014, at 7:13 PM, Dave Angel <davea@davea.name> wrote:
> Scott W Dunning <swdunning@cox.net> Wrote in message:
>>
>> On Feb 20, 2014, at 11:30 PM, Dave Angel <davea@davea.name> wrote:
>>
>>> Look at turtle.begin_fill and turtle.end_fill
>>>
>>> That's after making sure your star is a closed shape.
>>
>>
>>
>> So, this is what I have so far and it “works” but, it fills in the star with black and as you can see below I am trying to fill it in with red. So I’m obviously messing up somewhere.
>>
>> def fillcolor(red):
>> pencolor()
>> begin_fill()
>> star(500)
>> end_fill()
>>
>> red = pencolor
>> fillcolor(red)
>>
>
> You seem to have a fundamental misunderstanding of how variables
> and function parameters work.
Yes I just learned a little bit about functions a couple days ago in school. I am completely new to programming so thanks for any help!
>
>> def fillcolor(red):
> The parameter should be something like color, not red.
Ok I see.
I changed it a little based on what you suggested and I got a change, the outline became red but the fill is still black. Can you walk me through where I’m going wrong on what I have below?
From what I gather, I have a function called fillcolor with a parameter called color. I know this is going to sound stupid but I get a little lost after that. The function says when ever I call fillcolor do what’s in the body? What exactly does the parameter do (in this case color, how is that doing anything) and what is an argument?
def fillcolor(color): <- Function with parameter, right?
pencolor(color) <- Says make pencolor whatever I state when I call fill color, right?
begin_fill() <- starts filling the star. When I put color in () though I get an error that it takes no arguments?
star(500) <- Star function
end_fill() <- Ends fill
red = "red"
fillcolor(red)
I know that I know absolutely nothing but I’m trying and I just started so please bare with me. And thanks for any help, it's GREATLY appreciated!!
Scott
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Function and turtle help Scott W Dunning <swdunning@cox.net> - 2014-02-21 20:38 -0700
csiph-web