DadsWorksheets.com - Thousands of printable math worksheets for teachers, home schooling or general study!
One Dad. Four daughters. 9,266 worksheets... and counting!

Saved by the Snake!

Alright, so I know the Python programming language is actually named after the Monty Python group, but after all, the language’s logo (shown here) is a pair of snakes.

One of the great things about the site is how easy it has been to build the worksheets using Python, and it’s definitely gotten me out of some jams. Like today. I built all of the recent geometry worksheets using graphics saved in PNG format, which is a loss-less file format, making it somewhat more attractive relative to the older JPEG format. PNG isn’t a terribly new file format, but some people (including my wife) have had trouble printing the new worksheets. What I really needed to do was convert the 361 PNG files on which I’d labored over into JPEGs and then regenerate the worksheets.  Not much fun for a lazy guy like me.

There’s undoubtedly a bunch of freeware graphics converter programs around, but picking out an easy to use one that wasn’t loaded down with adware or spyware isn’t exactly how I wanted to spend my Saturday morning. Enter Python and the awesome Python Imaging Library.

In just a 126 bytes, I had my PNG to JPG converter together…

import os, Image
for fn in os.listdir('.'):
    if fn[-4:] == '.png':
        Image.open( fn ).save( fn[:-4] + '.jpg' )

If you were having trouble printing any of the new geometry worksheets, please try again.

Thank you, Python!

13 Comments »

  1. This is much better. I was afraid it was going to be a huge problem for you. It shows us that sometimes things work out much easier than we thought.

    Now if the schools were able to better deal with children who do things ahead of their schedules. From my experience, teachers really frown on any parent who teaches their children anything above grade level or before the teacher does. “Just leave it to me.” is their motto. Personally, I want to be as involved in my children’s education as possible and I will continue to find sites like this one to reinfoce or challenege my children. One teacher asked me why I had my daughter adding fractions. The answer was because she can. She missed one out of 20.

    Thanks for the great web site and I’ll pass the word as often as I can!

    Comment by Anonymous — April 4, 2009 @ 5:25 am

  2. This is a great site! I stumbled on here by chance and am sharing this with all the other homeschooling parents I know. Thank you very much for such a great math site.

    Comment by knightquester — April 6, 2009 @ 2:04 pm

  3. Really a great website – thanks for your fantastic effort!

    Comment by Patricia — April 10, 2009 @ 2:05 pm

  4. Hi
    I work as a private tutor in the UK. I was wondering if it was OK for me to use your worksheets with my students. I notice your copyright says personal or classroom use and I just wanted to check that this included private tutoring. I obviously charge for my teaching but I don’t charge separately for the worksheets I use!

    Comment by Sarah — April 16, 2009 @ 11:05 am

  5. Hi Sarah –

    You should absolutely feel free to use these for any sort of tutoring (paid or otherwise). I hope the worksheets help you and your students!

    Dad

    Comment by Dad — April 16, 2009 @ 12:14 pm

  6. Excellent web-site. Thank you for taking the time to publish it.

    Comment by Another dad, — April 30, 2009 @ 5:55 am

  7. Hi, great site. I was wondering if you use python to generate your worksheets? I teach an adult literacy program here in Ecuador and need to constantly supliment the math course with practice worksheets. Thanks for a great resource!

    Comment by Kevin — April 30, 2009 @ 6:25 am

  8. Hi Kevin –

    Yes, all the worksheets are built using python scripts that generate the raw HTML, plus all the corresponding navigation that is linked in through WordPress. It’s definitely been entertaining.

    Glad you found the site!

    Dad

    Comment by Dad — April 30, 2009 @ 8:23 am

  9. I can’t believe that I googled a subtraction line and came across this website, where it had math problems with subtractions lines and a timer that my 7 year old son really got a kick out of. Thank you so much, this is really a helpful site and fun site for math! How creative!!!

    Comment by Narvaez — May 11, 2009 @ 6:12 pm

  10. Dear Dad

    Good afternoon my name is Mary I found your site when I was looking for information on math. I am disabled and did not have a good education because of that. I want to thank you for putting all of those work sheets up for people to use for free. 🙂 It has been hard to find explanations for math much less work to do online without having to buy a school. Again thank you. 🙂

    Sincerely yours
    Mary

    Comment by Mary — May 13, 2009 @ 10:09 am

  11. Hi Narvaez –

    I’d wondered about those subtraction pages… They helped a lot here, but not many people have said much about them. I think the number lines will be much more useful when we start dealing with negative numbers!

    Hi Mary –

    I’m glad you found the site and it’s been useful for you… Everyone has to keep learning throughout our lives, so you’re not alone. The best of us will always be working to learn something new every day. Never stop and keep up that positive attitude! 🙂

    Dad

    Comment by Dad — May 13, 2009 @ 10:43 am

  12. Thank you so much for this resource. I stumbled across it by googleing free worksheets math. I tutor adult literacy and this is just what I need to target problem areas for students and not spend piles of dollars on more books. Thank you for all the hard work. Hope this site stays for a long time.

    Comment by Grace — May 20, 2009 @ 8:46 am

  13. Thanks Grace! I’m definitely planning on the site sticking around as a free resource… Glad you landed here!

    Comment by Dad — May 20, 2009 @ 8:52 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Worksheet Connect Logo

Math Worksheets