As always, thanks all for the ongoing help and suggestions... the learning 
continues.
 
I've successfully made a number of programs, making use of various random code.
 
Using random.choice etc
#-----------------------------------
import randomletters = ('a', 'b', 'c', 'd')a = random.choice(letters)print 
'your random letter is %s' %(a)
#------------------------------------or
#------------------------------------
import randomletters = ('a', 'a', 'b', 'b', 'c', 'd')a = 
random.choice(letters)print 'your random letter is %s' %(a)
#-----------------------------------
 
In the first random... , each abcd, has a equal chance of coming out. In the 
2nd random,... a b,.. have an extra chance vs c/d to come out, making them more 
likely.
 
What i would like to experiment now with is,... 
 
How can you control randomness... lets say for fish.
 
CatfishBreedA
Can be say, 4inches, to 24inches long
Most fish caught are say 7-14inches long
Maybe 1 in 1000 catfish caught are say, 16-20 inches long
Maybe 1 in 10000 catfish caught are say, 20inches +
 
How.. can you program that kind of randomness?
 
Or another way to look at it.
 
BasketballerA
Can score 4-45pts a game.
Most games, he scores 15-25 pts
Maybe 1 in 1000 games he scores 30 plus pts
Maybe 1 in 10000 he scores 45 pts.
 
The actual %'s, lengths, and pts are irrelevent,.. they are just used to as an 
example.
 
 
Any guidance would be appreciated.
 
 
Tony Noyeaux
_________________________________________________________________
Learn. Laugh. Share. Reallivemoms is right place!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to