Python Forum
Task-Throw a dice 10 Times
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Task-Throw a dice 10 Times
#4
Idea should be something like 'calculate average of 10 throws of 6-sided dice 5 times', implementation it can be:

from statistics import mean
from random import randrange

results = [mean(randrange(1, 7) for i in range(10)) for i in range(5)]
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
Task-Throw a dice 10 Times - by tjm - Mar-14-2021, 10:11 PM
RE: Task-Throw a dice 10 Times - by deanhystad - Mar-14-2021, 10:28 PM
RE: Task-Throw a dice 10 Times - by MattKahn13 - Mar-17-2021, 06:53 PM
RE: Task-Throw a dice 10 Times - by perfringo - Mar-17-2021, 07:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Find how many times a user played an artist and how many times disruptfwd8 1 2,625 May-04-2018, 08:32 AM
Last Post: killerrex

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020