[Tutor] Help Please on python

Alan Gauld alan.gauld at yahoo.co.uk
Tue Feb 7 04:47:41 EST 2017


On 07/02/17 02:12, Laura Garcia wrote:
> I need to create a python code that  should simulate throwing darts by
> random landing between (a random x and a random y)0 and 1.  and the program
> should print out number of darts that land within a rectangle.

Look in the random module. There are a bunch of different
random number generating functions in thee, just choose
the one that looks best suited to your task.

For the rest its just a case of some basic math. Write
some code and if you get stuck come back with a specific
question and we can try to answer it.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list