[Tutor] how to print random number multiply

bob gailer bgailer at gmail.com
Sat Jan 15 02:07:44 CET 2011


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 x for 
> example I want it to print new numbers when I store the print 
> statement in a variable x everytime I call x it's the same number and 
> does change I wanted it to change when I call it could someone show me 
> the code to do that thanks!
Sorry - but we are not mind readers.

Post the code you wrote, so we have some idea of what you mean by "bind" 
and "call".

I could guess but you should learn to provide sufficient information so 
we don't have to.

-- 
Bob Gailer
919-636-4239
Chapel Hill NC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110114/1f3cfc00/attachment.html>


More information about the Tutor mailing list