Hi Steven,
> Can I ask you to please post code using plain text rather than HTML
> email (also known as "rich text"), as HTML email messes up the
> formatting? In this case, I can reverse-engineer the correct formatting,
> so no harm done other than a waste of time, but that won't always be so
> e
> So use raw wx key events. They include key down,up and press events.
I'll give this a shot. Thank you.
> Bloated carries the connotation of unnecessary code, but pygame provides
a lot of functionality. You may not need it all, and using pygame may
require you to import more than you need. But
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, up
Hello world, can anyone tell me how i can perfect the program below.
it works find (prints 6 random numbers within a range) but on occasions the
numbers are repeated.
Thanks so much everyone
#program that will allow the user to generate random numbers
#from a range that they select.
impor
On Mon, Oct 17, 2011 at 11:13 AM, Ashish Gaonker wrote:
> Does Jython improve GIL issues of python by using JVM based threads?
> Will code work faster on Jython then CPython? Can anybody help me to
> understand this?
You can use the multiprocessing module (
http://docs.python.org/library/multipr
> Subject: Re: [Tutor] 6 random numbers
> From: shanta...@gmail.com
> Date: Mon, 17 Oct 2011 01:53:18 +0530
> CC: tutor@python.org
> To: kellyadr...@hotmail.com
>
> On 17-Oct-2011, at 1:13 AM, ADRIAN KELLY wrote:
>
> > hello all,
> > anyone know how i would go about printing 6 random n
On 17/10/11 17:13, Ashish Gaonker wrote:
Does Jython improve GIL issues of python by using JVM based threads?
Will code work faster on Jython then CPython? Can anybody help me to
understand this?
Speaking personally I've always fond CPython to be faster than
equivalent code in Jython. But that
bob gailer wrote:
It is not crucial here - but you must recognize that your program uses floating
point numbers, which almost always are an approximation to the
"real" value.
For example (assuming decimal numbers):
>>> 4/3.0
1. (followed by an unending number of 0's).
Actu
On 10/17/2011 11:55 AM, Sagar Shankar wrote:
The "real" value of 4/3.0 is 1 followed by an unending number of 3's.
Each successive fraction's floating point value will be "off" by some
relatively small value. Those errors will probably add up.
Another limitation of floating point numbers is
Does Jython improve GIL issues of python by using JVM based threads?
Will code work faster on Jython then CPython? Can anybody help me to
understand this?
--
Thanks & Regards
Ashish Gaonker
___
Tutor maillist - Tutor@python.org
To unsubscribe or chang
Sagar Shankar wrote:
Hi Bob,
I did use floating point numbers by using 4.0/1.0 - 4.0/3.0 etc., though I
did not declare it explicitly. Do you think it's better form/practice to
explicitly declare it?
Python doesn't use type declarations. 4.0 is already explicitly a float,
there's no need to d
Hi Bob,
I did use floating point numbers by using 4.0/1.0 - 4.0/3.0 etc., though I
did not declare it explicitly. Do you think it's better form/practice to
explicitly declare it?
Regards,
Sagar
On Mon, Oct 17, 2011 at 9:10 PM, bob gailer wrote:
> On 10/17/2011 6:31 AM, Sagar Shankar wrote:
>
On 10/17/2011 6:31 AM, Sagar Shankar wrote:
Hi, this is my first question to this group. I'm a
beginner to computer science and programming in Python. Am
currently using John Zelle's book - Python Programming: An
introduction to computer science to teach myself.
> print random.randrange(1,42)
> If you want to collect the intermediate results, either store them in a
> list:
>
> results = []
> for i in range(6):
> results.append(random.randrange(1,42))
Gmail has removed the "Reply All" function for some ABSOLUTELY
RIDICULOUS REASON, so I think peopl
Sagar Shankar wrote:
Hi, this is my first question to this group. I'm a beginner to computer
science and programming in Python. Am currently using John Zelle's book -
Python Programming: An introduction to computer science to teach myself.
Hi Sagar, and welcome.
Can I ask you to please post co
Hi, this is my first question to this group. I'm a beginner to computer
science and programming in Python. Am currently using John Zelle's book -
Python Programming: An introduction to computer science to teach myself.
In the book, there is an exercise to create a program that approximates the
val
16 matches
Mail list logo