Back to the main page

Mailing List Logs for ShadowRN

Message no. 1
From: shadowrn@*********.com (Gurth)
Subject: That D8 script...
Date: Sat Dec 8 07:45:00 2001
After sending that script to the list, I realized it probably has a slight
bug in it that could cause the rolls to be off. Here's a revised version:

-----script starts here-----
#! /usr/bin/env python

import random, sys

random.seed()

n = int(sys.argv[1])
c = 0
rolls = []

while c < n:
c = c + 1
r = int(random.random() * 8)
r2 = 1
while r % 7 == 0 and r != 0 and r2 != 0:
r2 = int(random.random() * 8)
r = r + r2
rolls.append(r)

rolls.sort()
print rolls

--
Gurth@******.nl - http://www.xs4all.nl/~gurth/index.html
"I know you're expecting me to take that as good news," Randy says.
-> NAGEE Editor * ShadowRN GridSec * Triangle Virtuoso <-
-> The Plastic Warriors Page: http://plastic.dumpshock.com <-

GC3.12: GAT/! d-(dpu) s:- !a>? C+@ UL P L++ E W-(++) N o? K w+(--) O V?
PS+ PE(-)(+) Y PGP- t@ 5++ X(+) R+++(-)>$ tv+ b++@ DI- D+ G+ e h! !r y?
Incubated into the First Church of the Sqooshy Ball, 21-05-1998

Further Reading

If you enjoyed reading about That D8 script..., you may also be interested in:

Disclaimer

These messages were posted a long time ago on a mailing list far, far away. The copyright to their contents probably lies with the original authors of the individual messages, but since they were published in an electronic forum that anyone could subscribe to, and the logs were available to subscribers and most likely non-subscribers as well, it's felt that re-publishing them here is a kind of public service.