Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

RE: RE: RE (tilly) 2: Adding 2 + 2

by BlaisePascal (Monk)
on Sep 11, 2000 at 20:56 UTC ( #31924=note: print w/replies, xml ) Need Help??

in reply to RE: RE (tilly) 2: Adding 2 + 2
in thread Adding 2 + 2

Is that integer range "between 1 and 3" inclusive or exclusive? You might want to include some error-checking:
{ print "Pick an integer between 1 and 3 (exclusive):" $mynum1 = <STDIN>; (print "Follow instructions!\n"),redo unless ($mynum < 3) and ($mynum > 1) and ($mynum == int($mynum)); }

Replies are listed 'Best First'.
RE: RE: RE: RE (tilly) 2: Adding 2 + 2
by KM (Priest) on Sep 11, 2000 at 20:59 UTC
    1 2 3
      |_ between


      So you are saying that when the state lottery instructions say "choose 6 numbers between 1 and 48", and the winning numbers are 1,4,17,24,36, and 48, then -nobody- should have won?

      "Between 1 and 3" is ambiguous in (American) English, with the most common meaning being inclusive.

        then -nobody- should have won?

        Yes, that is what I am saying. When I say "Look at what is between those two trees", I expect someone to look between the trees, and not at them :) If I meant the number 1, 2 and 3 I would say 'an integer from 1 to 3'. Pretty literal.


        Maybe they mean you can *any number* between 1 and 48, as long as you round your answer to fit their input restrictions. So technically you play the numbers 1.000001 and 47.83221 :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://31924]
and God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-07-21 00:37 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (442 votes). Check out past polls.