I've not had as much time as I'd like to look into python - however, I've written my obligatory calc script (with no error checking).
Feel free to try it for yourselves (note that advogator doesn't really look after indentation, or I haven't found out how to do it yet). Indentation is key in python.
First impressions are that python is nice and clean. I could do some special stuff with this, given my time commitments now. I'm thinking about writing a little app which keeps tracks of my computer magazine collection and the articles within (I waste loads of time flicking through all the magazines to find an article from Nov 2002). If something comes of this, I'll post it here.
#! /usr/bin/env python import sys
arg1 = raw_input("What is your first number?:") oper = raw_input("What operation: +, -, *, / ?") arg3 = raw_input("What is your second number?:")
num1 = float(arg1) num2 = float(arg3)
if oper == "+": answer = num1+num2 print answer elif oper == "-": answer = num1-num2 print answer elif oper == "/": answer = (num1/num2) print answer elif oper == "x": answer = (num1*num2) print answer
print num1, oper, num2, "=", answer