Friday, September 24, 2004

Circles

While on one hand it’s a good thing to complete a lot of small cycles it’s on the other hand the sure sign that I am not advancing. Still trying to find a solutoin for my last PHP challenge: Write a “loaded dice” program that generates the value 1 half the time, and some other value the other half.”.

I do not know how I have to formulate something that it will do it only half the time. The only thing that comes to mind is time/2, but don’t even know if I am close and/or how to implement this. So I am going in circles. With a quick break now to the coffee machine.

1 Comment »

  1. Finally figured this one out. Well, somewhat (generates the #1 rather 52% than 50% of the time as requested by the challenge). And I did it only with the help of posting to the # Dev Shed Forums after searching for hours on the web unsuccessfully. Here is my Solution and here is the code behind it.

    Comment by marlyse — Sunday, September 26, 2004 #

Leave a comment

authimage

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Subscribe without commenting