Re: Another stupid newbie question

2006-02-19 Thread Byte
"Do yourself a HUGE favour and read this before posting any more questions to comp.lang.python. Trust me, you really will thank us. http://www.catb.org/~esr/faqs/smart-questions.html " I find that webpage highly insulting, and so should you. It is treating you like a small child, who needs to be

Re: Another stupid newbie question

2006-02-18 Thread Steve Holden
Steven D'Aprano wrote: > On Fri, 17 Feb 2006 11:51:08 -0800, Byte wrote: > > >>Great, thanks all. Now, how come >> >>if x == mx: print x >>break >> >>Dosnt work? > > > Do yourself a HUGE favour and read this before posting any more questions > to comp.lang.python. Tr

Re: Another stupid newbie question

2006-02-17 Thread Steven D'Aprano
On Fri, 17 Feb 2006 11:51:08 -0800, Byte wrote: > Great, thanks all. Now, how come > > if x == mx: print x > break > > Dosnt work? Do yourself a HUGE favour and read this before posting any more questions to comp.lang.python. Trust me, you really will thank us. http

Re: Another stupid newbie question

2006-02-17 Thread Byte
Ahhh, Thanks -- /usr/bin/byte -- http://mail.python.org/mailman/listinfo/python-list

Re: Another stupid newbie question

2006-02-17 Thread Byte
Great, thanks all (the point of x = 2 was that i dont understand exactly what True is on while True:) -- /usr/bin/byte -- http://mail.python.org/mailman/listinfo/python-list

Re: Another stupid newbie question

2006-02-17 Thread Georg Brandl
Byte wrote: > Great, thanks all. Now, how come > > if x == mx: print x > break > > Dosnt work? If you have a suite with more than one line, you must put it on a new line. if x == mx: print x break Perhaps it would be good for you to work through the Python T

Re: Another stupid newbie question

2006-02-17 Thread Byte
Great, thanks all. Now, how come if x == mx: print x break Dosnt work? -- /usr/bin/byte -- http://mail.python.org/mailman/listinfo/python-list

Re: Another stupid newbie question

2006-02-17 Thread Ian Leitch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Byte wrote: > How can I make the following code: > > from random import random > > > > def stuff(a, mx): > x = 2 > while x == 2: > x = random() > if x == mx: print x > else: print 'No luck,', x > x = 2 > > S

Re: Another stupid newbie question

2006-02-17 Thread Ravi Teja
Benjamin Niemann wrote: > Byte wrote: > > > How can I make the following code: > > > > from random import random > > > > > > > > def stuff(a, mx): > > x = 2 > > while x == 2: > > x = random() > > if x == mx: print x > > else: print 'No luck,', x > > x = 2 >

Re: Another stupid newbie question

2006-02-17 Thread Benjamin Niemann
Byte wrote: > How can I make the following code: > > from random import random > > > > def stuff(a, mx): > x = 2 > while x == 2: > x = random() > if x == mx: print x > else: print 'No luck,', x > x = 2 > > Stop when x == mx? What's the intention behind

Another stupid newbie question

2006-02-17 Thread Byte
How can I make the following code: from random import random def stuff(a, mx): x = 2 while x == 2: x = random() if x == mx: print x else: print 'No luck,', x x = 2 Stop when x == mx? Thanks in advance, -- /usr/bin/byte -- http://mail.python.org/mailm