Re: [Tutor] A total newbie…sorry

2011-10-27 Thread Nick Zarr
The syntax has changed from 2.x to 3.x.

2.x:
 print Hello
Hello

3.x:
 print(Hello)
Hello


-- 
Nick Zarczynski http://rentageekit.com
Blog 4 http://nickzarr.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2011-10-17 Thread Nick Zarr
I think this was already mentioned in the replies to your other post:

from random import sample

base = int(input(Enter the bottom of the range? ))
upper = int(input(Enter the upper limit of your range: ))
quantity = int(input(How many numbers do you want to select: ))

sample(range(base, upper), quantity)

http://docs.python.org/library/random.html#random.sample

-- 
Nick Zarczynski http://rentageekit.com
Blog 4 http://nickzarr.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor