help..

Chris Angelico rosuav at gmail.com
Thu May 2 10:30:02 EDT 2013


On Fri, May 3, 2013 at 12:20 AM, leonardo <tampucciolina at libero.it> 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



More information about the Python-list mailing list