[Tutor] Running Existing Python

2011-02-25 Thread Justin Bonnell
I downloaded Python 2.7.1. I think this is a pretty basic question. When I try to run the existing python files on the computer (hello.py), I receive a syntax error. Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "copyright", "credits" or "l

Re: [Tutor] Running Existing Python

2011-02-26 Thread Justin Bonnell
Okay. When I try to run the script from the terminal, it still doesn't work. Here is a screenshot. <> What am I doing wrong? On Feb 25, 2011, at 6:46 PM, Alan Gauld wrote: > > "Justin Bonnell" wrote > >> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:

Re: [Tutor] Running Existing Python

2011-02-26 Thread Justin Bonnell
On Feb 26, 2011, at 4:49 AM, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, Justin Bonnell wrote: >> Okay. When I try to run the script from the terminal, it still doesn't work. >> Here is a screenshot. >> >> >> >> >> >> What

Re: [Tutor] Running Existing Python

2011-02-26 Thread Justin Bonnell
-This is the correct for my computer: /Library/Frameworks/Python.framework/Versions/2.7/bin/python > > and copy the output instead of /usr/env > > > Alan Gauld > Author of the Learn To Program website > http://www.alan-g.me.uk/ > > > > > - Original Messa

Re: [Tutor] Running Existing Python

2011-02-26 Thread Justin Bonnell
On Feb 26, 2011, at 3:18 PM, Corey Richardson wrote: > On 02/26/2011 04:10 PM, Justin Bonnell wrote: > >> --This is the location of the file: >> >> /jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py >> >> but it still says it cannot find the

[Tutor] textbook question

2011-02-27 Thread Justin Bonnell
In trying to learn Python, I'm reading through How to Think Like a Computer Scientist. I'm just on the third chapter but I'm getting stuck on this question: Fill in the body of the function definition for cat_n_times so that it will print the string, s, n times: def cat_n_times(s, n): Save