#!/usr/bin/python3
################################################################################
# Read and print all command line arguments 
# argv[0] is always the current script name
# all input arguments are strings - to make a number use int() or float()
# This script will not work directly on the web
################################################################################
print("Content-Type: text/html \n")  #http header with newline char (required for web)
import sys                           #sys module to accept arguments

num_of_args = len(sys.argv)          #length of the argv array

if num_of_args <= 1:                 #name of this script is always provided as argv[0]
    print("Please provide command line arguments")
    exit()

print("You supplied.........." , num_of_args , " arguments")
print("Your arguments are...." , sys.argv)

print()
print("Notice the 1st argument is always the name of this script")

for idx in range(num_of_args):
    print('arg', idx, ':', sys.argv[idx], '\t', type(sys.argv[idx]) )