Re: [Tutor] Simple Python Program

2010-07-31 Thread Steven D'Aprano
On Sun, 1 Aug 2010 01:11:41 pm bob gailer wrote: > On 7/31/2010 8:24 PM, Steven D'Aprano wrote: > > On Sun, 1 Aug 2010 04:35:03 am bob gailer wrote: > >> Continue to avoid writing functions. They are not necessary for > >> such a simple program. > > > > That is *terrible* advice. Absolutely awful.

Re: [Tutor] Simple Python Program

2010-07-31 Thread Luke Paireepinart
I think I agree more with bob on this one - he wasn't saying functions weren't important, just that they weren't important to this case. Sure polymorphism and inheritance and properties and generators and list comprehensions are awesome and useful, but I wouldn't suggest they are necessary for e

Re: [Tutor] Simple Python Program

2010-07-31 Thread bob gailer
On 7/31/2010 8:24 PM, Steven D'Aprano wrote: On Sun, 1 Aug 2010 04:35:03 am bob gailer wrote: Continue to avoid writing functions. They are not necessary for such a simple program. That is *terrible* advice. Absolutely awful. Well I disagree. I was trying to steer the OP to get

Re: [Tutor] Simple Python Program

2010-07-31 Thread Steven D'Aprano
Hi Jason, Let's see if we can clean up some of your program. You had this function: > def inputNames(playerOne, PlayerTwo): > p1name = raw_input("Enter your name.") > p2name = raw_input("Enter your name.") > return playerOne, playerTwo Let's write this in plain English. (1) The fu

Re: [Tutor] Simple Python Program

2010-07-31 Thread Steven D'Aprano
On Sun, 1 Aug 2010 04:35:03 am bob gailer wrote: > Continue to avoid writing functions. They are not necessary for such > a simple program. That is *terrible* advice. Absolutely awful. Functions should not be avoided unless necessary. Functions should be used unless there is a compelling reason

Re: [Tutor] Simple Python Program

2010-07-31 Thread David Hutto
On Sat, Jul 31, 2010 at 2:35 PM, bob gailer wrote: > On 7/31/2010 12:00 AM, Jason MacFiggen wrote: > > Can anyone tell me how to fix the errors I am getting if possible? I'm quite > new and so confused... > > > I could give lots of diagnostic advice and detail. There is so much wrong > with this p

Re: [Tutor] Simple Python Program

2010-07-31 Thread bob gailer
On 7/31/2010 12:00 AM, Jason MacFiggen wrote: Can anyone tell me how to fix the errors I am getting if possible? I'm quite new and so confused... I could give lots of diagnostic advice and detail. There is so much wrong with this program. I suggest you discard it, back up and start with the si

Re: [Tutor] Simple Python Program

2010-07-31 Thread Evert Rol
> Can anyone tell me how to fix the errors I am getting if possible? I'm quite > new and so confused... You're not telling us what the errors are. If you'd like us help to debug your program, best is to provide information about how you run it, and what output you're getting. Not just the progr

[Tutor] Simple Python Program

2010-07-30 Thread Jason MacFiggen
Can anyone tell me how to fix the errors I am getting if possible? I'm quite new and so confused... also how do I display the winner under the displayInfo function? import random def main(): print playerOne, playerTwo = inputNames(playerOne, PlayerTwo) while endProgram == 'no':