[Tutor] Re: New to programming question

2005-04-13 Thread Andrei
Ben Markwell gmail.com> writes: > if prefixes[n] == 'O' or 'Q': A tip: when working with several boolean (and/or/not) conditions in one test, it's helpful to use parentheses in order to make sure you get what you expect. Let me demonstrate. The example above is equivalent to: if (prefixes[n

[Tutor] Re: New to programming question

2005-04-12 Thread Jeffrey Maitland
Ben Markwell writes: This is an exercise from "How to think like a Computer Scientist." The following example shows how to use concatenation and a for loop to generate an abecedarian series. "Abecedarian" refers to a series or list in which the elements appear in alphabetical order. For examp