A little script in python: from sys import * from math import pi from string import digits def usage(): print "Find the value of a pizza.\nUsage: pizza-value " exit() try: radius = float(argv[1])/2 price = argv[2] if price[0] not in digits: price = price[1:] price = float(price) except: usage() squnits = pi*(radius**2) value = squnits/price print "pizza is %.4f square units\n%.4f Galactic Credits per square unit\n%.4f square units per Galactic Credit" % (squnits, price/squnits, squnits/price) And in a lispy fantasy language: (with sys:* math:pi string) (= (usage) (("Find the value of a pizza.\nUsage: pizza-value ") (quit))) (# Perl-style shortcut or for try blocks: ) (| ((= radius (/ argv:1 2)) (= price argv:2) (& (in string:digits price:0) (++ price)) (float= price)) (# function in place ) ((usage))) (# this is the try block's except ) (= squints (* pi (expt radius 2))) (= value (/ squints price)) ("pizza is [%.4f squnits] square units\n[%.4f (/ price squnits)] Galactic Credits per square unit\n[%.4f (/ squints price)] square units per Galactic Credit")