The following built in Mathematica functions can be of some use for your programming project :

Subsets[list]
gives a list of all possible subsets of list.  
You can use this instead of generating subsets by using binary words.
Example:

Subsets[{1, 2, 3, 4}]

Binomial[n,m]
gives the binomial coefficient (({{n}, {m}})). 
Example:

Binomial[7, 3]

Table[ expression, {n, lowerbound, upperbound}]
is a nice way to generate a list. Example:

Table[n, {n, 1, 10}]
Table[n^2, {n, 1, 10}]

Basic program control :  contitionals, loops, input-- output,  see the Documentation center under the help menu.  Enter the search  guide/ProceduralProgramming
in the search window at the top.

The Mathematica equivalent of a function or procedure in other languages is a Module.  See Documentation center,  ref/Module  for information.
Examples:

Euclid' s algorithm for gcd :

gcd[m0_,n0_]:=
Module[{m=m0,n=n0},
While[n≠0,{m,n}={n,Mod[m,n]}];
m
]

gcd[18,21]

Here is an example of input of a variable number of parameters to a module; you need this sort of input for your project.  This module takes a list of some length n and adds the entries.

Clear[trial]
trial[n_,  a_List] := Module[{n0 = n,  a0 = a, sum, i}, 
sum = 0;
For[i = 1, i≤ n, i++,  sum = sum + a[[i]]];
sum
]

Examples :

trial[3,  {x, y, z}]

trial[10,  Table[j^2, {j, 1, 10}]]

The following takes as input a list of variable length, forms all subsets (sublists)  of the list, and for for each subset, adds the elements of the subset.

trial2[n_, a_List] := Module[{n0 = n, a0= a,subsets },
subsets = Subsets[a0];
Map[Total, subsets]
]

Examples :

trial2[3, {x, y, z}]

trial2[4, {1,1,1, 1}]