ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-Tutor
python-Tutor
Re: [Tutor] A recreational math problem for Useless Python
by Rob Andrews other posts by this author
Aug 15 2001 9:25PM messages near this date
RE: [Tutor] A recreational math problem for Useless Python | RE: [Tutor] A recreational math problem for Useless Python
Daniel Coughlin wrote:
>  
>  Well I know this is not a very good solution - but it is my first attempt.
>  I used the random module to create the number sets ad that can take a long time.
>  Is there a better way of going about creating the sets? (I dont want to check
>  the article yet - besides i doubt i will understand any of it ;-)
>  The other problem I encountered which is probably soaking up time is that there
>  is an unaccounted for runtime error that happens periodically. I handle this,
>  but i know it still happens, and it is knawing at me... If anyone can
>  figure out way that happens, I'd love to know.
>  
>  One thing you will notice is that you can change the level of precision by
>  changing the string slice indexes.
>  
>  To get two decimal places over usually takes between 5 and 15 seconds. But
>  sometimes it takes a while.
>  BTW - I *really* like problems like this - If you have any others, I'd love to
>  hear about them.

It took me long enough, but your solution has been posted to Useless
Python. If you truly enjoy this sort of problem, take a look at some of
the (hundreds of) ACM problems available:

http://www.lowerstandard.com/python/acmcontest.html

Thanks,
Rob

-- 
A {} is a terrible thing to waste.
Useless Python!
http://www.lowerstandard.com/python

_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Danny Yoo
Rob Andrews
Tim Peters
Daniel Coughlin
Rob Andrews
Danny Yoo

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved