Re: [Tutor] how to print random number multiply

2011-01-14 Thread Alan Gauld
"walter weston" wrote I have mostly studied python and now I'm ready to start writing code. Its usually best to study programming languages *by* writing code. However since you have now reached that stage of readiness that's irrelevant advice :-) I want to print random numbers a certain am

Re: [Tutor] how to print random number multiply

2011-01-14 Thread David Hutto
On Fri, Jan 14, 2011 at 8:01 PM, David Hutto wrote: > Sorry , the tab button doesn't work for text in google mail, and it > jumped to send > >>> > >   import random >> for x in range(1,10): num = random.random() >       print (num) this should 'bind' your variable to a knew random each t

Re: [Tutor] how to print random number multiply

2011-01-14 Thread bob gailer
On 1/14/2011 7:46 PM, walter weston wrote: I have mostly studied python and now I'm ready to start writing code. I want to print random numbers a certain ammount of times I am using the code import random print (random.random()) I tried bind the print statement to a variable and when I call

Re: [Tutor] how to print random number multiply

2011-01-14 Thread David Hutto
Sorry , the tab button doesn't work for text in google mail, and it jumped to send >>  import random > for x in range(1,10): print (random.random()) This assigns a new random each time, where as outside the for loop it assigns it once. ___ Tut

Re: [Tutor] how to print random number multiply

2011-01-14 Thread Steven D'Aprano
walter weston wrote: I have mostly studied python and now I'm ready to start writing code. I want to print random numbers a certain ammount of times I am using the code import random print (random.random()) I tried bind the print statement to a variable and when I call x for example I

Re: [Tutor] how to print random number multiply

2011-01-14 Thread David Hutto
>  import random for x in range(1,10) > print (random.random()) -- Sometimes...my mama...says I get over excited about technology. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/li

Re: [Tutor] how to print random number multiply

2011-01-14 Thread Corey Richardson
On 01/14/2011 07:46 PM, walter weston wrote: > I have mostly studied python and now I'm ready to start writing code. I > want to print random numbers a certain ammount of times I am using the > code > > import random > print (random.random()) > > I tried bind the print statement to a varia

[Tutor] how to print random number multiply

2011-01-14 Thread walter weston
I have mostly studied python and now I'm ready to start writing code. I want to print random numbers a certain ammount of times I am using the code import random print (random.random()) I tried bind the print statement to a variable and when I call x for example I want it to print new