/* Generating random number
*/
from random import randint
print(randint(0,5))
>>> # anyone from 0 to 5
For generating only 0 or 1
print(randint(0,1))
>>> 0 or 1
Best,
Bhanu Pratap
www.bhanubais.com
-Original Message-
From: Tutor [mailto:tutor-bounces+bha
On 10/3/2013 12:31 PM, Joe Jacques wrote:
Hi and welcome to the tutor list.
Be aware that we are a few volunteers who enjoy assisting when you have
tried something and are stuck.
As you may have gathered from Mark's response - we don't do homework for
you. Were you expecting that, or if not what
On Thursday 2013 October 03 09:31, Joe Jacques wrote:
> Problems in the link
>
> http://home.manhattan.edu/~ankur.agrawal/cmpt101/assgn5.txt
>
> Sent from my iPhone
Python 2.7.2 (default, Oct 10 2011, 10:47:36)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "cre
On 03/10/2013 17:31, Joe Jacques wrote:
Problems in the link
http://home.manhattan.edu/~ankur.agrawal/cmpt101/assgn5.txt
Sent from my iPhone
Sorry but if you want us to do your work you'll have to send a suitably
sized cheque to the PSF, where the size refers to the amount written in
words
On Fri, 3 Jun 2005, Xiaoxia Xu wrote:
> I tried to use a Python library module random() to generate some noise
> to my data. But the interpreter gave me an error message saying
> NameError: name 'random' is not defined. I thought this error is
> because I don't have the pertinent library includ
Don't forget to call : import random
try:
import random
print random.randint(2,8)
print random.random()
good luck
pujo
On 6/4/05, Xiaoxia Xu <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I tried to use a Python library module random() to generate some
> noise to my data. But the interpreter gave me