title: How to solving linear equations with python
body: <p>I am trying to solve linear equations with a <code>numpy</code> array based on user inputs. I've programmed a simple calculator that can deal with every day problems, but I would like to add the feature where you can choose to solve a linear equation.<br>
  Exp: </p>
  
  <pre><code>2x + 10 = 20 ==&gt; x = 5 
  </code></pre>
  
  <p>In above example, how would I use user inputs with a <code>numpy</code> array?</p>
  
  <pre><code>print('Select Mathematical Operation.')
  print('1. Addition') 
  print('2. Subtraction')
  print('3. Multiplication')
  print('4. Division')
  
  userchoice = input ('Enter choice (1/2/3/4): ')
  
  import numpy as np
  x = int(input("Enter x:"))
  y = int(input("Enter y:"))
  w = int(input("Enter w:"))
  a = np.array([[x],[y]])
  b = np.array([w])
  z = np.linalg.solve(a,b)
  return z
  </code></pre>