Hi, Take a look at the random module, function randint:
>>> import random >>> random.randint(1, 10) 7 >>> random.randint(1, 10) 9 >>> random.randint(1, 10) 1 >>> random.randint(1, 10) 8 >>> random.randint(1, 10) 7 >>> random.randint(1, 10) 9 >>> random.randint(1, 10) 1 >>> random.randint(1, 10) 1 >>> random.randint(1, 10) 7 >>> random.randint(1, 10) 2 >>> random.randint(1, 10) 9 >>> Hugo Merrie wrote: > Ok first thing I need a direction on is random number generation, I > looked through the Python manual and I must be missing it. > > What Im looking for, needing is a random generation 1 through 10 + > modifier, example > like rolling a 1d10 +1 > > Not sure what syntex to use. > > Thanks! > Merrie > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor