| 73Q Music Videos | Vote On Clips | Submit | Login   |

Reddit Digg Stumble Facebook
Desc:there's science everywhere
Category:Educational, Science & Technology
Tags:obsession, devotion, esotericism, wasted effort
Submitted:whatevre
Date:01/05/12
Views:2021
Rating:
View Ratings
Register to vote for this video

People Who Liked This Video Also Liked:
Backyard wrestler's grand entrance
Jason Russell's meltdown up close
The Thrill Of It All
The Sexxxtons: Mother-Daughter Porn Duo Interview
Cybergoth - Is It Killing The Goth Scene?
Iron Foundry (First Recording)
Simpsons: Flanders meets Canadian Flanders
Cannabis Planet preview clips
Paranoia
Adventure Dental :30
Comment count is 14
chumbucket
Your 1000 conjured undead army takes damage from the giant fireball attack...I'm going to roll damage for each now.
exy
No damned histogram?!
Corpus Delectable
Tits at 13:57.
Robin Kestrel
He wants the dice to be centered in the frame. Does he use a dice cup? No. He picks them up and moves them around.
kingofthenothing
Dude you can get 1000 dice rolls in a second.

This is me modifying the coinflip.py from "Invent Your Own Computer Games With Python." This is python 3. It's Q&D but fuck it it works.

import random
print ('I will roll a die 1000 times. Guess how many times it will come up each number. (Press enter to begin!)')
input()
rolls = 0
ones = 0
twos = 0
threes = 0
fours = 0
fives = 0
sixes = 0
while rolls < 1000:
if random.randint (0, 5) == 0:
ones = ones + 1
if random.randint (0, 5) == 1:
twos = twos + 1
if random.randint (0, 5) == 2:
threes = threes + 1
if random.randint (0, 5) == 3:
fours = fours + 1
if random.randint (0, 5) == 4:
fives = fives + 1
if random.randint (0, 5) == 5:
sixes = sixes + 1
rolls = rolls +1

if rolls == 900:
print ('900 rolls and there have been ' + str (ones) + ' ones and ' + str (twos) + 'twos and ' + str (threes) + 'threes and ' + str (fours) + 'fours and ' + str (fives) + 'fives and ' + str (sixes) + 'sixes so far.')
if rolls == 100:
print ('At 100 rolls, there have been ' + str (ones) + ' ones and ' + str (twos) + 'twos and ' + str (threes) + 'threes and ' + str (fours) + 'fours and ' + str (fives) + 'fives and ' + str (sixes) + 'sixes so far.')
if rolls == 500:
print ('Halfway done, and there have been ' + str (ones) + ' ones and ' + str (twos) + 'twos and ' + str (threes) + 'threes and ' + str (fours) + 'fours and ' + str (fives) + 'fives and ' + str (sixes) + 'sixes so far.')

print()
print('Out of 1000 rolls of the die, there have been ' + str (ones) + ' ones and ' + str (twos) + 'twos and ' + str (threes) + 'threes and ' + str (fours) + 'fours and ' + str (fives) + 'fives and ' + str (sixes) + 'sixes!')
print('Were you close?')

If you want to get the other die just run it again.
kingofthenothing
shit, the indentation didn't come out right. Sorry about that.

pastorofmuppets
shoulda used arrays! zero/one/many OR ELSE.

kingofthenothing
I just wanted to advertise "IYOCGwP" a little - it's free and just about anyone can learn from it. Also it took me a lot less time to modify this than it took the guy in the video to make all those rolls.

pastorofmuppets
i should be less vague. python doesn't actually have arrays, but lists. anyway if you have a bunch of "numbered" variables, it's quicker to treat them as array/list/whatever subscripts. this doesn't really match your program but it should prove the point:

from random import randint

count = [0,0,0,0,0,0] # one for each side
for _ in range(1000):
count[randint(0,5)] += 1

count

dunno if you care... i'm sure that tutorial avoided lists so that it could introduce them later. check out string formatting too.

>> print 'ones: {0[0]}, twos: {0[1]}'.format(count)

doesn't work great for this example, but they're useful in general.

pastorofmuppets
sorry didn't see your post in between

kingofthenothing
It's cool, thanks for sharing that.

MrBuddy
Why not just dump a box with 1000 dice onto the floor?
whatevre
there are a lot of points being missed here
pastorofmuppets
"Look," whispered Chuck, and George lifted his eyes to heaven. (There is always a last time for everything.)

Overhead, without any fuss, the stars were going out.
Register or login To Post a Comment







Video content copyright the respective clip/station owners please see hosting site for more information.
Privacy Statement