1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Nov 2013
Posts
6
Rep Power
0

#### Project for school help please!!

using the problem of points, your task is to write a python script that will estimate the probabilities of of each player winning, given their scored at the time the game was abandoned. it should do this by running the game to its conclusion 1000 times and seeing which proportion are won by A and B
Your programme should take as input the specified winning total, T, and the scores, x and y of the two players at the point the game was abandoned the output should be how much money each player will receive ( they each put \$5 dollars in so total \$10)
PLEASE PLEASE help me with this, i haven't a clue where even to start, anyone got any advice on what i should do and what commands i should use.
also if anyone is willing to write the script for me i will offer payment.
Alex
2. Please describe the problem of points.
3. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Nov 2013
Posts
6
Rep Power
0

#### the problem of points

the problem of points, is where two players A and B each put £5 in to a pot as prize money for the game. A fair coin will be tossed repeatedly , when it lands on head A gets a point, when it lands on tails B gets a point. the winner is the first person to to get to T points (the case i am using is where T=10)
at a point in the game, where A has 8 points and B 7, the game is abandoned, and they need a fair way to distribute the pot between them, they decide the amount each player receives is proportional to the probability of the player winning if the game continued.
now the task is to write a python script simulating the end of the game, running it 1000 times and working out the proportion won by A and B. the program shoud take the input of the specified winning total T and scores of A and B of the two players when the game was abandoned and the output should be how much money each player should recieve
4. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Nov 2013
Posts
6
Rep Power
0
the problem of points, is where two players A and B each put £5 in to a pot as prize money for the game. A fair coin will be tossed repeatedly , when it lands on head A gets a point, when it lands on tails B gets a point. the winner is the first person to to get to T points (the case i am using is where T=10)
at a point in the game, where A has 8 points and B 7, the game is abandoned, and they need a fair way to distribute the pot between them, they decide the amount each player receives is proportional to the probability of the player winning if the game continued.
now the task is to write a python script simulating the end of the game, running it 1000 times and working out the proportion won by A and B. the program shoud take the input of the specified winning total T and scores of A and B of the two players when the game was abandoned and the output should be how much money each player should recieve
5. #### function names should be verbs, not nouns.

OK. Upon abandonment,
a player needs T-(their current points) additional points.

We can toss a coin like this:
Code:
```import random
How could we then increment the correct counter?

And let's say we get this history for 3 trials instead of 1000 trials.
Code:
```  Let's name the players H and T
score
H    T      status,     Trial 1
8    7      abandoned!
9    8      tails
9    9      tails

H    T      status,     Trial 2
8    7      abandoned!

H    T      status,     Trial 2
8    7      abandoned!
9    8      tails
9    9      tails
9   10      tails```
What is the probability of player H winning?
Last edited by b49P23TIvg; November 20th, 2013 at 10:30 PM. Reason: fixed random.choice I'll never learn the name of this function.
6. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Nov 2013
Posts
6
Rep Power
0
i have a code, theres seems to be a problem with it, will you look at it for me please? i think its with a while and if loop?
7. #### No substance. Not even ethereal.

From the looks of it, the program is too short!