# Functions Exercise

Before we learn about classes and objects, let’s do a quick exercise to review how to create and use functions in our code.

## Problem Statement

Write a program that accepts input from a file provided as a command-line argument. If an incorrect number of arguments are provided, or if the program is unable to open the file, it should print “Invalid Arguments” and terminate.

The program’s input will consist of a list of 100 integers, one per line. If any line of the input cannot be converted to an integer, the program should print “Invalid Input” and terminate.

The program should determine whether the list of integers is considered a mathematical set. That is, each item in the list should be unique, with no duplicate numbers. If the input is not a set, it should print “Not a set” and terminate.

If the input is a set, then the program should print the sum of the values in the set and then terminate.

This program should consist of three functions:

• `main(args)` - The main function that controls the program. It should accept an array of strings representing the command-line arguments to the program.
• `is_set(numbers)` - A function to determine if the given array is a set. The input should be a single array of integers, and the return value should be a Boolean value.
• `sum_set(numbers)` - A function to find the sum of all the elements in the given array. The input should be a single array of integers, and the return value should be an integer.

Don’t forget to include a main guard at the end of the file that passes the contents of `sys.argv` as an argument to the `main()` function.