Re: [Tutor] Crazy craps problem

2011-10-09 Thread Andreas Perstinger
On 2011-10-09 07:16, col speed wrote: The part of the script that is causing the problem is as follows: def point(num): while True: raw_input(Roll) uno, dos = random.choice(dice), random.choice(dice) three = uno+dos print {0} + {1} = {2}.format(uno, dos,

Re: [Tutor] Crazy craps problem

2011-10-09 Thread col speed
On 9 October 2011 13:17, Andreas Perstinger andreas.perstin...@gmx.netwrote: On 2011-10-09 07:16, col speed wrote: The part of the script that is causing the problem is as follows: def point(num): while True: raw_input(Roll) uno, dos = random.choice(dice),

Re: [Tutor] Crazy craps problem

2011-10-09 Thread Steven D'Aprano
col speed wrote: Hi again, Once more I've come up with a problem I can't explain. It must be something simple, but I can't work it out. The part of the script that is causing the problem is as follows: def point(num): while True: raw_input(Roll) You ask the user for input, but

Re: [Tutor] Crazy craps problem

2011-10-09 Thread Andreas Perstinger
On 2011-10-09 08:25, col speed wrote: Thanks for your prompt reply! Here's the whole thing: import random message = Welcome to craps Place your bet and roll the dice. 7 or 11 wins. 2, 3 or 12 loses. Others are point. player = Your

Re: [Tutor] Crazy craps problem

2011-10-09 Thread col speed
-- snip if point(one+two) == win: Here you go into the function point the first time. Inside the function you are in an infinite while-loop where you only exit if the sum is either 7 (lose) or equal the given parameter (win). Then you compare the return value. In the case of lose

[Tutor] Crazy craps problem

2011-10-08 Thread col speed
Hi again, Once more I've come up with a problem I can't explain. It must be something simple, but I can't work it out. The part of the script that is causing the problem is as follows: def point(num): while True: raw_input(Roll) uno, dos = random.choice(dice),