Terry, Thank you for the suggestions. I am going to stick with these little toy programs as you aptly put them to make sure I have a good grasp on the basics. I completely agree with you that I need to do something that I want to solve a problem with and in fact, thats whats motivated me to find
Terry Carroll wrote:
> On Thu, 18 May 2006, Chris Delgado wrote:
>
>
>> Kent,
>>
>> So if you have just been reading, I suggest you try writing a few small
>> programs as warmups."
>>
>> I think you are right on the money here. I need to write some more
>> simple stuff.
>>
>
> Chris, I'd
On Thu, 18 May 2006, Chris Delgado wrote:
> Kent,
>
> So if you have just been reading, I suggest you try writing a few small
> programs as warmups."
>
> I think you are right on the money here. I need to write some more
> simple stuff.
Chris, I'd also suggest that, once you have a few toy p
Chris,
> I do like the way you simplified using the random function,
> I need to start thinking like that.
It is quite clever but quite a subtle twist for a beginner to think
of.
However even in your version there is a pattern you should look
out for:
>> coin = random.randrange(2)
>>
Bob, Thanks for the input. I was trying to stick to the lessons in the chapter whose problems I was working on and so I knew using a for loop might be a bit better, I decided to stick with the stuff from the chapter. I do like the way you simplified using the random function, very clever. I need to
Chris Delgado wrote:
> Bob et al,
>
> Ok guys, program is all fixed up and runs well. HEre is the final
> code. Thanks for the help and its on to the next prog. Thanks for the
> patience and help!
>
> Chris
>
> # A program that simulates flipping a coin 100 times and the reports
> the number of
Bob et al, Ok guys, program is all fixed up and runs well. HEre is the final code. Thanks for the help and its on to the next prog. Thanks for the patience and help!Chris# A program that simulates flipping a coin 100 times and the reports the number of heads and tails that were flipped#import rand
Chris Delgado wrote:
> johnf,
>
> Yup, I actually thought that might be my mistake but I forgot to
> actually try it. So I did and revised the code (which I'll post below)
> and now get a syntax error after my heads += line..yikes .
>
> # A program that simulates flipping a coin 100 times and the
johnf, Yup, I actually thought that might be my mistake but I forgot to actually try it. So I did and revised the code (which I'll post below) and now get a syntax error after my heads += line..yikes .# A program that simulates flipping a coin 100 times and the reports the number of heads and tails
On Thursday 18 May 2006 16:19, Chris Delgado wrote:
> import random
>
> heads = 0
> tails = 0
> flips = 0
>
> if flips <= 100:
>
> coin = random.randrange(2)
>
> if coin = 0:
> heads +=
> elif coin = 1:
> tails +=
>
> flips +=1
>
> print "The coin was flipped 100 tim
Kent, Thanks once again."I wonder if maybe you need to write some code? You talk about *reading* but you haven't mentioned *writing*. You can't learn to program without writing programs - that would be like learning to write a foreign language by reading books in the language - it helps but it won'
Kent, Thanks once again."I wonder if maybe you need to write some code? You talk about *reading* but you haven't mentioned *writing*. You can't learn to program without writing programs - that would be like learning to write a foreign language by reading books in the language - it helps but it won'
Chris Delgado wrote:
> Here is an example of the type of output I am looking for.
OK, I think you have your work cut out for you :-) I still think my
basic approach can work but the output handler is going to have to keep
track of a fair amount of stuff as it gets parse events. The good news
Kent,>OK, just looking at this, I'm guessing that you might want some kind of >data to represent the players, maybe something to represent the pot, >maybe something to represent the cards on the table. It really depends >on what kind of output you want to get from this. Can you post an >example of
Chris Delgado wrote:
> Here is a sample hand history.
>
> Failure To Launch 8161071-72989 Holdem No Limit $0.50/$1
> [May 17 03:26:33] : Hand Start.
> [May 17 03:26:33] : Seat 1 : bnb3 has $92.50
> [May 17 03:26:33] : Seat 2 : pineaa has $15.25
> [May 17 03:26:33] : Seat 3 : prowlerslim has $107.
Kent, Thanks for the reply."I would pick one input format and work on a program that reads it and generates some kind of events for everything significant that happens. At first the events could be just print statements, later they can reformat the data to the required output format. From your desc
Chris Delgado wrote:
> Hello all,
>
> I have been studying python tutorials and have a couple beginning python
> books that I have worked through. I have a very specific project in mind
> and I want to ask a couple questions. The project in question is this:
>
> I am making a Hand History conve
Alan, First off, thanks for the detailed reply, it is much appreciated. On to your message:>I don't know anything about poker but in general terms this is>a text format conversion tool. since you know the source can>be in different formats I'd adopt an OOP approach with a generic>hand object which
> I am making a Hand History converter for online poker players.
> This takes the textual record of how a hand played and turns
> into a more readable format suitable for posting at various websites
> where people discuss how the hand was played. Id like to start
> with the converter working for on
Hello all, I have been studying python tutorials and have a couple beginning python books that I have worked through. I have a very specific project in mind and I want to ask a couple questions. The project in question is this:I am making a Hand History converter for online poker players. This take
20 matches
Mail list logo