Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    # print out the end result in percent
    print "You were lucky " . int($luck * 100 / $runs) . "% of the time st
    +icking to your initial decision.\n";
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    # print out the end result in percent
    print "You were lucky " . int($luck * 100 / $runs) . "% of the time ch
    +anging your decision.\n";
    
  3. or download this
    You were lucky 33% of the time sticking to your initial decision.
    You were lucky 66% of the time changing your decision.