Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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.048 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'exercise': 0.04; 'fixed,': 0.09; 'seemed': 0.09; 'yeah,': 0.09; 'def': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'opposite': 0.16; 'syntactic': 0.16; 'url:courses': 0.16; 'wrote:': 0.18; 'code,': 0.22; 'example': 0.22; 'error': 0.23; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'raise': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'quite': 0.32; 'worked': 0.33; 'fri,': 0.33; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'half': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'url:3': 0.61; 'success': 0.61; 'address': 0.63; 'kind': 0.63; "'and'": 0.84; '(probably': 0.84; 'end.': 0.84; 'subject:..': 0.84; 'try,': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Gy6MJVy/tKRDSQaEr/3RphuTHOlRhRogtxzNbO3jhms=; b=zUHiq3CqqvujyylIt5ABwz06FiIDgZHoaXzdLl6vKUVYauYAyg2c1V4zM/B1ITkjhp 6dRpDgAGI2k7p6n45un+Z+Gj1UgSb+yJm5P8kHLq6BI/HDB9F0IXL5pjCLO9lIHV70N7 EOeYf3OeBbrtxFgUqF8qJbP04wfVS92lq7hnd80hd9euY4fTCnTTf8F9wPS6nYti3xuI onKxaCFOBZKbAwSsHah3dq3VMZ1jHv4pkHdpbVtqCon/xNxrL+VPufmZbEb8f0ob5PB+ GTgem1Y0otLMmuCJmwU1DHNBvVHSSzxWtB34wSE6ZmVyv2knJGnsBSWDiv/PyEmn7BY+ E9fA== MIME-Version: 1.0 X-Received: by 10.52.20.210 with SMTP id p18mr1887293vde.42.1367505002742; Thu, 02 May 2013 07:30:02 -0700 (PDT) In-Reply-To: References: <57E38A20-B52B-4CAE-B1FB-487DD99B48AD@icloud.com> Date: Fri, 3 May 2013 00:30:02 +1000 Subject: Re: help.. From: Chris Angelico 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367505004 news.xs4all.nl 15984 [2001:888:2000:d::a6]:53960 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44629 On Fri, May 3, 2013 at 12:20 AM, leonardo wrote: > 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=4f89dab3d788890003000096 Well, I gave it a try, and it seemed to work :) Your second example has a syntactic error (probably you want to say "days" again in the second half of the 'and' condition), but with that fixed, both work and are accepted by the opposite end. Though that last consideration may not be all that indicative; this code was accepted and gave the "Way to go!" success message: def rental_car_cost(days): raise OSError() Yeah, I don't think that quite worked :) ChrisA