Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RE: 'nother P(erlython) Hacker

by mt2k (Hermit)
on Sep 10, 2000 at 03:49 UTC ( #31775=note: print w/ replies, xml ) Need Help??


in reply to 'nother P(erl|ython) Hacker

My version:

$n=int(rand(1001));print'>'; while(<>){++$i;last if$_==$n;$_>$n?$n--:++$n;print'Too ',$_>$n?'big':' +small',"\n>";} print"Won in $i tries\n";


Comment on RE: 'nother P(erlython) Hacker
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://31775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-09-18 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls