#!/usr/bin/env python # # file: foo.py # # import system libraries # import sys # print hello world # print("hello world") # declare floats # X = float(3.0) Y = float(27.999) print("the value of X = %f, Y = %f" % (X, Y)) # print the command line arguments # print(sys.argv) print("args: %s, %s, %s" % (sys.argv[0], sys.argv[1], sys.argv[2])) print("number of arguments = %d" % (len(sys.argv))) print(X) print(Y) # do some math # A = 3 B = 2 C = A / float("4.0") print(A) print(B) print(C) # concatenate strings # XXX = "Joe = 1" YYY = 'Alex = 27' print(XXX) print(YYY) print(XXX + " / " + YYY) # a simple loop # for i in range(0,10): print(i); print("Joe")