By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

what dose this code do exactly?

shahram555
P: 4
Expand|Select|Wrap|Line Numbers
  1. import random
  2. for i in range(10):
  3.     x=random.triangular(1,2,3)
  4.     print(x)
Aug 11 '14 #1

✓ answered by Rabbit

It prints out 10 random numbers from a triangular distribution.

Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,366
It prints out 10 random numbers from a triangular distribution.
Aug 11 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.