Python

Very simple Python script to count the number of words in a block of text

Recently I had to write a small 'essay' which required not more than 250 words.  Since it was Computer Science related, I figured I would write a small script to count the words for me... this is what I came up with.

doc = raw_input()
count = doc.count(' ') + 1
print count

 

 

Spider Coil Calculator for Radio Applications - Python Code

In my crystal set post I use spider coils, because they are easy to make (my 8yo daughter wound one all by herself), and because they have better Q than a TPR coil (Toilet Paper Roll - common type used in basic crystal sets).

Caesar Cipher / Affine Cipher cracking

Recently I started doing a course on encryption (which due to unforseen earthquakes I had to drop again).  What I did before I left the course is got quite interested in the process of cracking codes (actually, I had an interest in that already - this course just gave me an excuse to delve into it).

Knights Tour - Auto-Solver, written in Python

What follows is my first attempt at a Knights Tour solver.

It is written in Python (2.6), and is currently pretty ugly, but it works.
I'll post updates as I add them (IF I add them). Feel free to comment.

Steve

 

Python tkinter GUI - change default icon: Windows vs. Linux

I'm learning Python at the moment... and as part of that I've been looking at creating platform-independent applications.

The first step, I figured, was to get a basic window operating cross-platform.  I did this, no problem.  I did some reading on tkinter, which seems pretty straight forward (apart from being Tkinter in Python 2.x and tkinter in Python 3.x - note the case change - pretty annoying for converting apps from the old version).  So that was all good anyway.