[Tutor] Logging to different directories

2011-09-24 Thread Brett Ritter
I commonly prefer to have my log files in //MM/DD/ directories (it allows for lots of fun command-line actions). I've not yet sussed out a nice way to do this with the logging module. Before I ask the main list, is there a fundamental feature I've missed? The TimedRotatingFileHandler will le

Re: [Tutor] Infinite Loop

2011-09-24 Thread Alan Gauld
On 24/09/11 15:43, Cameron Macleod wrote: Hi, I've been trying to code a simple guess my number game as a starter programming project but I've generated an infinite loop accidentally. Since I'm new to programming in general, I can't really figure out what's causing it. Nehal told you how to fi

Re: [Tutor] Infinite Loop

2011-09-24 Thread xDog Walker
On Saturday 2011 September 24 07:43, Cameron Macleod wrote: > Hi, > > I've been trying to code a simple guess my number game as a starter > programming project but I've generated an infinite loop accidentally. Since > I'm new to programming in general, I can't really figure out what's causing > it.

Re: [Tutor] Infinite Loop

2011-09-24 Thread nehal dattani
Hi cameron, Sorry, I didn't tested it properly. Actual block should go like this while guess != the_number: if guess > the_number: print("Lower...") else: print("Higher...") guess = int(input("Take a guess: ")) tries += 1 On Sat

Re: [Tutor] Infinite Loop

2011-09-24 Thread nehal dattani
Hi, Please modify your else block . else: print("Higher...") guess = int(input("Take a guess: ")) tries += 1 This should work for you. Regards, Nehal Dattani On Sat, Sep 24, 2011 at 8:13 PM, Cameron Macleod wrote: > Hi, > > I've been trying to code a simple guess my n

[Tutor] Infinite Loop

2011-09-24 Thread Cameron Macleod
Hi, I've been trying to code a simple guess my number game as a starter programming project but I've generated an infinite loop accidentally. Since I'm new to programming in general, I can't really figure out what's causing it. Thanks === import random print("\tWelcome to 'G

Re: [Tutor] paper scissors

2011-09-24 Thread bodsda
The %s signifies that a string will be provided to go there. The % after the string signifies that the following variable/strings/tuple will contain the items to be placed where the %s's are (in order) The tuple (wins, losses) are the two items that should replace the %s's Be aware that there

Re: [Tutor] guess-my-number programme

2011-09-24 Thread Kĩnũthia Mũchane
On 09/23/2011 11:28 PM, Wayne Werner wrote: On Fri, Sep 23, 2011 at 2:25 PM, ADRIAN KELLY > wrote: can anyone explain the *_tries_* part of this programme to me i know its meant to count the number of guesses made by the user by adding 1 but i ju