Welcome back folks.

So I’ve been reading just about everything I can today about python. Thanks to another helpful comment, I found an MIT course on ‘a gentle introduction to programming with Python’ (or something similar). I’ve been reading that today and trying a few things out from it, mostly figuring out how the course is set up. I’ve also been trying the one from Stanford.

Another note, bought a new keyboard yesterday. The Logitech k800, a handy little keyboard that’s an improvement over the old Microsoft ARC I had (with no number pad, a disappointment).

I worked on the problem I originally posted about on the blog, the solving of a 4×4 grid when given a number at the end of each column and each row that the numbers in that column or row multiply out to. Thanks to a few tips I was able to get a better grasp on the use of arguments in my functions. Here’s what it was simplified down to: El paste-o. And here’s the code with no formatting:

#!/usr/bin/python
import math
vert = [162, 200, 147, 140]
nums = []
def isprime(vert):
for divby in range(1,10):
if vert%divby == 0:
nums.append(divby)
print nums

for num in vert:
isprime(num)

I had had something similar, but left out the last two lines, which is a big part of getting it to run correctly for each value in vert. Slowly gettin’ there.

Someone else had code that prints out the numbers only once. I think that code prints several lists out, but it’s a vast improvement over what I had before. I’m still trying to figure some algorithm for actually SOLVING the puzzle, though. No dice yet.

I also decided to pick up a book today. I have an e-copy of “How to Think Like a Computer Scientist: Python,” which is what the MIT course uses. I’ve made my way through that about half way. Now I have a much more comprehensive book by the title of “Beginning Python, From Novice To Professional,” by Magnus Lie Hetland.

Lastly, I think I’m going to start working on my windows7 box, as it has much better hardware than my laptop, and can handle having 20+ tabs open in chrome much better than the lappy.

Well, that’s the blog of the day. Hope somebody found something worth reading in there 🙂 Until tomorry.