Re: [Tutor] counting number of inputs (EARLIER VERSION SENT ACCIDENTLY)

2006-05-03 Thread Marc Poulin
Michelle: Are you familiar with writing functions? Here I've created a function named getInputs. I've also created a few test cases to verify that (a) my understanding of the problem is correct, and (b) my solution is correct. It's important to think about how your program is supposed to behave

Re: [Tutor] Logical Sorting

2006-07-07 Thread Marc Poulin
I did a Google search for "python numeric sort" and found http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/135435 It seems to do what you want. Marc --- Evan Klitzke <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to sort a list of directories that > correspond to kernel > sources und

Re: [Tutor] no loops

2006-07-11 Thread Marc Poulin
--- John Fouhy <[EMAIL PROTECTED]> wrote: > On 12/07/06, Christopher Spears > <[EMAIL PROTECTED]> wrote: > > Now the exercise is: > > As an exercise, rewrite this function so that it > > doesn't contain any loops. > > > > I have been staring at this function and drawing a > > blank. Something te

Re: [Tutor] Need Help

2006-07-11 Thread Marc Poulin
--- Terry Carroll <[EMAIL PROTECTED]> wrote: > On Tue, 11 Jul 2006, Michael P. Reilly wrote: > > > Another aspect of your assignment will be to be > able to use this > > functionality from the "command-line". This > means: without asking questions > > from the user, but input is being passed

Re: [Tutor] When am I ever going to use this?

2006-08-01 Thread Marc Poulin
--- Christopher Spears <[EMAIL PROTECTED]> wrote: > I've been working through a tutorial: > http://www.ibiblio.org/obp/thinkCSpy/index.htm. > Lately, I have been learning about abstract data > types > (linked lists, stacks, queues, trees, etc.). While > I > do enjoy the challenge of creating the

Re: [Tutor] about assert

2006-09-13 Thread Marc Poulin
--- "linda.s" <[EMAIL PROTECTED]> wrote: > Python manual has a very brief introduction of > "assert" statements. It > is very difficult for me to understand it. Every program has some fundamental assumptions that must remain true in order for the program to continue giving correct results. The

Re: [Tutor] about assert

2006-09-13 Thread Marc Poulin
--- [EMAIL PROTECTED] wrote: > >>Python manual has a very brief introduction > >>of "assert" statements. It is very difficult > > First you probably don't need to use asserts > very often, they are useful if you are building > production strength code but for most users > of Python the exce

Re: [Tutor] Looking for an edutainment-type introduction to programming book

2006-09-29 Thread Marc Poulin
Look here: www.ceebot.com Not a book, but it might be what you are looking for. --- Abel Daniel <[EMAIL PROTECTED]> wrote: > > Hi! > > I'm looking for a book to give to my younger brother > as a birthday > present. He is 13 years old, had some experience > with logo (but not > much, so he kno

Re: [Tutor] Help

2006-10-01 Thread Marc Poulin
--- Kefka Palazzo <[EMAIL PROTECTED]> wrote: > I am trying to learn a programming language good for > programming entire > games (core functions too) similar to both the Final > Fantasy and Metroid > series. From the book I'm learning from (Python > Programming for the Absolute > Beginner, by Mich

Re: [Tutor] Workaround for limitation in xrange()?

2006-10-10 Thread Marc Poulin
--- Dick Moores <[EMAIL PROTECTED]> wrote: > > Andrei's > Write your own iterator: > >>> def hugerange(minval, maxval): > ... val = minval > ... while val < maxval: > ... yield val > ... val += 1 > > All 3 are essentially the same, aren't they. Which > makes me feel even