dice Questions

7

Solved

I'm new to programming and in my project, I'm trying to print basic dice graphics. I'm trying to make a function that accepts two numbers from 1 to 6, and prints corresponding two dice faces next ...
Campanulate asked 5/10, 2018 at 19:33

2

Solved

I promise this is not just another dice rolling homework problem. I implemented a function to calculate the probability of obtaining less than a sum s when rolling n m-sided dice. My function works...
Idelia asked 28/4, 2020 at 20:29

1

Solved

I tried to solve the classic problem of generating a random integer between 1 and 7, given a function that generates a random integer between 1 and 5. My approach was to add the result of 2 calls t...
Trotta asked 17/12, 2018 at 21:29

9

Solved

For a game I'm trying to determine the frequency that a certain # will show up at a given # of dice being rolled. I know... that question seems odd. Let me try to explain it with real numbers. So,...
Vital asked 29/1, 2009 at 20:23

3

Solved

I was going through some coding exercises, and had some trouble with this question: From 5 dice (6-sided) rolls, generate a random number in the range [1 - 100]. I implemented the following me...
Taliped asked 3/9, 2014 at 23:59

2

I 'm trying to solve Project Euler problem 240: In how many ways can twenty 12-sided dice (sides numbered 1 to 12) be rolled so that the top ten sum to 70? I've come up with code to solve this...
Harim asked 12/12, 2012 at 9:45

2

Solved

Background As described here http://www.ericharshbarger.org/dice/#gofirst_4d12, "Go First" Dice is a set of four dice, each with unique numbering, so that: Any roll of two or more dice will nev...
Decade asked 7/9, 2012 at 21:44

7

Solved

I have been asked this question, but failed to find an article that describe a good method. Instead I came out with my own method (see my answer below). However it is also possible that I merely ca...
Helpless asked 2/2, 2011 at 15:57

2

Solved

In cases where order does matter, it's rather easy to generate the matrix of all possible outcomes. One way for doing this is using expand.grid as shown here. What if it doesn't? If I'm right, ...
Herzel asked 23/5, 2010 at 19:9

3

Solved

My brother turns 21 in a couple of weeks and my parents and I are taking him to Las Vegas. For my 21st, I brought $200 to gamble in Vegas and came home with around $450, mostly from playing craps. ...
Cumquat asked 22/2, 2010 at 5:45

2

Solved

I am trying to predict the output of a program that uses msvcrt's rand() function for generating the face of three dice. I believe the code is something like: dice[0] = rand() % 6 + 1; dice[1] = ra...
Women asked 19/12, 2009 at 1:40

4

Solved

So I want to be able to parse, and evaluate, "dice expressions" in C#. A dice expression is defined like so: <expr> := <expr> + <expr> | <expr> - <expr> | [<numb...
Weasel asked 9/8, 2009 at 9:12

5

Solved

Ok so I have a dice throw app... When I step through the code it functions normally and 'results' contains the correct number of throw results and they appear to be random, when I leave the code t...
Skimmer asked 29/9, 2009 at 13:33

14

Rules Write a function that accepts string as a parameter, returning evaluated value of expression in dice notation, including addition and multiplication. To clear the things up, here comes EBN...
Tirrell asked 23/6, 2009 at 9:14
1

© 2022 - 2024 — McMap. All rights reserved.