Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'else:': 0.03; 'exercise': 0.04; 'elif': 0.05; 'exception.': 0.09; 'received:192.168.1.101': 0.09; 'sfxlen:2': 0.11; 'python': 0.11; 'def': 0.12; 'wrote': 0.14; 'answers:': 0.16; 'function?': 0.16; 'url:courses': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'thu,': 0.19; 'seems': 0.21; 'code,': 0.22; 'to:name:python-list@python.org': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'fine': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; "i'm": 0.30; 'url:mailman': 0.30; '(which': 0.31; 'code': 0.31; 'getting': 0.31; 'url:python': 0.33; "i'd": 0.34; 'but': 0.35; 'there': 0.35; 'alle': 0.36; 'url:listinfo': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'received:it': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'url:mail': 0.40; 'how': 0.40; 'days': 0.60; 'url:3': 0.61; "you're": 0.61; 'address': 0.63; 'header:Message-Id:1': 0.63; 'kind': 0.63; 'again!': 0.84; 'received:212.52.84': 0.84; 'received:libero.it': 0.84; 'subject:..': 0.84; 'ore': 0.91; 'received:212.52': 0.91; '2013': 0.98 X-CTCH-Spam: Unknown X-CTCH-RefID: str=0001.0A0C0207.51827641.0049,ss=1,re=0.000,fgs=0 X-libjamoibt: 1823 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: help.. From: leonardo In-Reply-To: Date: Thu, 2 May 2013 16:20:48 +0200 Content-Transfer-Encoding: quoted-printable References: <57E38A20-B52B-4CAE-B1FB-487DD99B48AD@icloud.com> To: "python-list@python.org" X-Mailer: Apple Mail (2.1499) Cc: "help@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367504631 news.xs4all.nl 15906 [2001:888:2000:d::a6]:51098 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44628 on codecademy there is an interactive box where you type your code, it = is a kind of exercise program to practice. but i don't understand what = is wrong. this is the website address of that if you want to give a = look: = http://www.codecademy.com/courses/python-beginner-P5YtY/1/3?curriculum_id=3D= 4f89dab3d788890003000096 Il giorno 02/mag/2013, alle ore 16:06, Chris Angelico = ha scritto: > On Thu, May 2, 2013 at 11:56 PM, leonardo selmi = wrote: >> so i wrote the following code: >> def rental_car_cost(days): >> cost =3D 40*days >> if days >=3D 7: >> return cost - 50 >> elif days >=3D 3 and days < 7: >> return cost - 20 >> else: >> return cost >>=20 >> but it seems not to be right cause the computer answers: Oops, try = again! >> Did you create a function called rental_car_cost? >=20 > That code looks fine to me (though I'd drop the "and days < 7" as it's > redundant); but the error you're getting isn't a Python exception. > What's giving that error? You may need to check the framing of your > code. How does codecademy (which I'm not familiar with) locate your > function? >=20 > ChrisA > --=20 > http://mail.python.org/mailman/listinfo/python-list