Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36496
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'argument': 0.04; 'root': 0.04; 'classes.': 0.07; 'compute': 0.09; 'def': 0.10; 'subject:python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:programming': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'jan': 0.18; 'math': 0.20; 'import': 0.21; 'help.': 0.22; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'convention': 0.27; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'chris': 0.28; 'probably': 0.29; 'function': 0.30; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; '2013': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cI70k39nD8dwlh8P0+vqvsmxTnU7kmCnkjeKX+piV0o=; b=oQHe7lC/fnl8nIALcCegh8d+w3yuEve2K4rGYYGMVSXsOZjQSRS+wrXF+bZoHaL9YV bD8X39HPKwPaYwjnGeJJit0ZeVJqQ+AvlCd9jMalC+AOqG4ohvn+hxfwxOVFeoCH9f/L uQ6DReBXjXk6DeKjaPGeHRqKzHksFbnDEKZJfdJ4bVti3uZgARyTfHLVBIXwnWWyxDWn unXoi16j7YbPHcnKsvAoVa/76yKG/XOKUI7LHZ+7ukTkWOesCZPPqVrT4MlmHvu2G2zW 3NsUGMCbAnLr8GWEUx7P7SpjhNiG/rEwdyYrh24fa0tKegEXMb58mWNlKayWGp7dmQzx 3Azg== |
| MIME-Version | 1.0 |
| In-Reply-To | <0CF6C67958A245C883EB705CEF9F968F@favour> |
| References | <0CF6C67958A245C883EB705CEF9F968F@favour> |
| Date | Thu, 10 Jan 2013 02:18:11 +1100 |
| Subject | Re: new to python and programming at large |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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 | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.319.1357744700.2939.python-list@python.org> (permalink) |
| Lines | 16 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357744700 news.xs4all.nl 6852 [2001:888:2000:d::a6]:55986 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:36496 |
Show key headers only | View raw
On Thu, Jan 10, 2013 at 8:03 AM, <kwakukwatiah@gmail.com> wrote: > pls I want to write a function that can compute for the sqrt root of any > number.bt it not working pls help. > from math import sqrt > def squareroot(self): > x = sqrt(y) > print x The 'self' argument is a convention used in classes. You probably want to call your argument y: def squareroot(y): since that's what you then pass to math.sqrt. Chris Angelico
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: new to python and programming at large Chris Angelico <rosuav@gmail.com> - 2013-01-10 02:18 +1100
Re: new to python and programming at large Alister <alister.ware@ntlworld.com> - 2013-01-09 15:38 +0000
Re: new to python and programming at large Chris Angelico <rosuav@gmail.com> - 2013-01-10 02:43 +1100
csiph-web