[Tutor] fake defrag revisited

2011-09-30 Thread R. Alan Monroe
I'm revisiting the fake defrag program I posted about a few months ago. The concept is basically a screensaver or light show where you can enjoy watching entropy being reversed as colored blocks order themselves visually. I set it aside for a while because it was too slow, but I finally came up wi

Re: [Tutor] guess age programme (please help)

2011-09-30 Thread Steven D'Aprano
Hi Adrian, ADRIAN KELLY wrote: Hi all, can anyone help me with the attached programme. I'd love to, but I can't open it :( If the truth be known, I could open it if I spent the time and effort. But that actually is significant time and effort: in my email, your attachment looks like this:

Re: [Tutor] Input

2011-09-30 Thread Steven D'Aprano
Cameron Macleod wrote: Hi, When you type Input("\n\nPress The Enter Key To Exit") it forces you to press the enter key to close the program. Why is it the enter key instead of e.g. the 'esc' key? Because the convention is that you use the Enter key to ENTER information. That's why it is cal

Re: [Tutor] guess age programme (still stuck!!!!!)

2011-09-30 Thread Alan Gauld
On 30/09/11 21:21, Dave Angel wrote: print "\n\nGood guess!!" input ("\n\nPress the enter key to exit.") input() returns a character string. Given the OP's print style I assume he is running Python v2 so input() will evaluate a number as an int. But given that using input() is usually fro

Re: [Tutor] Input

2011-09-30 Thread bodsda
You could also use something like pygame to wait and test for keypresses Bodsda (Top post is phone limitation, sorry) Sent from my BlackBerry® wireless device -Original Message- From: Mark Lybrand Sender: tutor-bounces+bodsda=googlemail@python.org Date: Fri, 30 Sep 2011 13:27:27 To

Re: [Tutor] Input

2011-09-30 Thread Mark Lybrand
There is apparently a livewires package that may be of someuse. On Sep 30, 2011 1:25 PM, "Dave Angel" wrote: > On 09/30/2011 03:24 PM, Cameron Macleod wrote: >> Hi, >> >> When you type >> >> Input("\n\nPress The Enter Key To Exit") >> >> it forces you to press the enter key to close the program. W

Re: [Tutor] Input

2011-09-30 Thread Dave Angel
On 09/30/2011 03:24 PM, Cameron Macleod wrote: Hi, When you type Input("\n\nPress The Enter Key To Exit") it forces you to press the enter key to close the program. Why is it the enter key instead of e.g. the 'esc' key? The input() function (not the Input()) function accepts a line of text

Re: [Tutor] guess age programme (still stuck!!!!!)

2011-09-30 Thread Dave Angel
(Please don't top-post. Place your remarks after whatever quoting you do from the previous message. And trim the parts that are no longer relevant) On 09/30/2011 03:18 PM, ADRIAN KELLY wrote: please guys still stuck on this problem and i have been at it for hours so please if anyone can hel

Re: [Tutor] guess age programme (still stuck!!!!!)

2011-09-30 Thread bodsda
If I enter 35 at the prompt in your program, does python see this: 35 Or this: “35“ ? Hope this helps, Bodsda Sent from my BlackBerry® wireless device -Original Message- From: ADRIAN KELLY Sender: tutor-bounces+bodsda=googlemail@python.org Date: Fri, 30 Sep 2011 19:18:15 To: Cc: S

[Tutor] Input

2011-09-30 Thread Cameron Macleod
Hi, When you type Input("\n\nPress The Enter Key To Exit") it forces you to press the enter key to close the program. Why is it the enter key instead of e.g. the 'esc' key? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o

Re: [Tutor] guess age programme (still stuck!!!!!)

2011-09-30 Thread ADRIAN KELLY
please guys still stuck on this problem and i have been at it for hours so please if anyone can help. it nearly works. am i looking at it from the wrong angle? i have tried everyone's suggestions but i am stuck still... correct code would be nice. thanksadrian (new pythoner) print(

Re: [Tutor] guess age programme (please help)

2011-09-30 Thread Christian Witts
On 2011/09/30 02:04 PM, ADRIAN KELLY wrote: Hi all, can anyone help me with the attached programme. it is fairly basic (like me) i want it to ask the user to guess the age and countdown when making incorrect guesses. it doesn't seem to count the first attempt (run it and see please). i also

Re: [Tutor] guess age programme (please help)

2011-09-30 Thread bodsda
Hi, I haven't checked your code because I am on my phone, but here is a tip for the loop condition Use the guess in your loop condition e.g. while guesses != 0: Do stuff That way, when guesses does equal 0, the loop condition will be false and therefore the loop will not run. If you don't

[Tutor] guess age programme (please help)

2011-09-30 Thread ADRIAN KELLY
Hi all, can anyone help me with the attached programme. it is fairly basic (like me) i want it to ask the user to guess the age and countdown when making incorrect guesses. it doesn't seem to count the first attempt (run it and see please). i also want to know how to go about setting a cond