title: Mathematica - Function to return list
body: <p>I'm new to Mathematica, and I'm trying to create an input function which would return a list of offsprings for the genetic algorithm, but the code returns </p>
  
  <pre><code>Null Return[{}]
  </code></pre>
  
  <p>after asking for the number of offsprings. How can I get the code to run and return the offspring list as inputted? Thanks!</p>
  
  <pre><code>inputData[]:= (
    i = 1
      offspring = {};
    offspringSize = Input["Enter number of offspring"];
    While[i &lt;= offspringSize,
     n = Input[
       "Enter data in form {Potential 1, Potential 2, Number of cycles, \
  Cycle Length, Wave Form, Result}"];
     offspring = Append[offspring, n];
     n =.;
     i++;
     ];
    Print[offspring]
     Return[offspring]
    );
  
  newData = inputData[]
  </code></pre>