title: Average calculator to run python scripts with arguments
body: <p>I am trying to make a simple average calculation but trying my best to run on CMD.
  So far this is what I've came out</p>
  
  <pre><code>import sys
  
  myList = [a,b,c]
  
  myList[0] = int(sys.argv[1])
  
  myList[1] = int (sys.argv[2])
  
  myList[2] = int(sys.argv[3])
  
  print 'Average:'  + sum(myList) / len(myList)
  </code></pre>
  
  <p>my question is; how do set a variable in a list to give them a value?</p>
  
  <p>EDIT:</p>
  
  <pre><code>   import sys
  
      myList = [a,b,c]
  
      a = int(sys.argv[1])
  
      b = int (sys.argv[2])
  
      c = int(sys.argv[3])
  
      print 'Average:'  + sum(myList) / len(myList)
  </code></pre>
  
  <p>whats wrong with this code?</p>
  
  <p>EDIT:</p>
  
  <p>I want to allow users to run this program with three input arguments by passing three values to the program: a, b and c.</p>
  
  <p>Edit:</p>
  
  <p>this is my final edit, anyone can help  me with this</p>
  
  <pre><code>import sys
  
  a = float(sys.argv[1])
  b = float(sys.argv[2])
  c = float(sys.argv[3])
  if a == str or  b == str or c == str:
     print 'Your input is invalid'
  else:   
      print 'Average: %.2f ' % ((a + b + c) / 3)
  </code></pre>