Python Programming

  • Wrapped In Python – Edition 4 – Primitive Root Finder

    Mostly because of their importance in some types of  asymmetric cryptography (Diffie-Hellman, RSA) I have a fascination with prime numbers.  I enjoy occasionally checking on the latest discovery of ever larger prime numbers.  As I write the largest known prime has more than 17, 425, 170 digits in it.  That’s a big-ass number!   Many […]

  • Wrapped In Python – Edition 3 – Prime Number Verifier

    In my last post I offered two different examples for generating prime numbers using python.  The first script in that post generated every prime (except 2) from 1 to 9,999,999 and the second script generated every prime in a user-supplied range. It’s neat to be able to generate a bunch of prime numbers but what […]

  • Wrapped In Python – Edition 2 – Prime Number Generator

    Perhaps just a step up from writing your first “Hello World” script.  I wrote [yet another] prime number generator.  I’m sure this can be done in a variety of ways but I used what I currently know to figure out how to determine if a number is prime. Here’s the code: #!/usr/bin/env python print “2 […]

  • Using the Percent Sign in Python

    I have started and stopped learning python an embarrassing number of times.  Guess what?  I’m at it again.  For reasons I cannot adequately explain I have never really been able to latch on to it.  I am, after all, a networking guy at heart.  I have always wanted to write my own code but in some geek form of writer’s block I could never come up with a “why” for programming.  As I learned I never made that all important leap into the realm of, “Here’s how I can utilize this to make my life better|cooler|easier.”  Ponderous, I know.  Well now I find myself overrun with ideas for programs I want to write.  I’m brimming with them.  Can’t tell you what they are, mind you.  I, like most, am waiting for people to know me by my truncated last name (Zuck, ya’ see).

    As a form of penance I always start back at the beginning of python.  I force myself to read (albeit quickly) the chapter on what python is and why it’s good and then I read the section on how to install python (Windows).  As I type this (on my iMac) I am running an Ubuntu VM and a Window 8 VM (God, I hate Windows 8).  Python is python is python, of course.  I just like to see if anything is different anywhere (which I don’t expect it to be).  It’s good to go through the motions, even with OS’ I don’t use as often any more (Windows), and make sure I stay honest about them all.