title: (Python 3.6.4)Im using the 'z' var as the user input. It gives me an error about this and ignores the other "if" statements
body: <p>I am working on a simple calculator. I started Python 3 three days ago. I was very happy making this code. It is supposed to be able to add, subtract, multiply, and divide 10 numbers. </p>
  
  <p>I was working on the adding part of it, which works completely fine. However, it gives me a NameError when I try to subtract, multiply, and divide numbers. </p>
  
  <p>The code starts by asking the user if they would like to use the calculator. If you say no, it stops the code. If you say yes, it asks if you would like to add, subtract, multiply, or divide. </p>
  
  <p>If you say add, you can add up to 10 numbers (not finished yet). If you say any of the others, it gives a NameError saying, </p>
  
  <pre><code>if z in [2]:
  NameError: name 'z' is not defined
  </code></pre>
  
  <p>I've been trying to solve this problem for about 1 hour now. I've done research, and couldn't find the issue. I use Python 3.6.4. It would be great if anyone could help me out on this. Thanks.</p>
  
  <p>FYI: Don't forget, I'm not done with this code. Yes, it's supposed to be able to work with 10 numbers in the end, but I found this problem and didn't want to make it any worse. Thank you.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>#New Code
  print("Welcome to this simple calculator")
  #Yes/No
  a = input("Would you like to use this simple calculator?(Yes/No):")
  print(a + ' confirmed')
  
  if a in ["No","no"]:
      print("Come back next time!!")
      raise SystemExit
  
  if a in ["Yes","yes"]:
      b = input("Would you like to add, subtract, multiply, or divide?")
  #Add
  if b in ["Add", "add"]:
      z = float(input("How many numbers would you like to add?(2-10):"))
      if z in [2]:
          c = float(input("Enter a number to add:"))
          d = float(input("Enter another number to add:"))
          print("The result is", + c + d)
          print("Come back next time!!")
          if z in [3]:
              k = float(input("Enter a number to add:"))
              t = float(input("Enter a number to add:"))
              s = float(input("Enter another number to add:"))
              print("The result is", + k + t + s)
              print("Come back next time!!")
              if z in [4]:
                  n = float(input("Enter a number to add:"))
                  m = float(input("Enter a number to add:"))
                  w = float(input("Enter a number to add:"))
                  r = float(input("Enter another number to add:"))
                  print("The result is", + n + m + w + r)
                  print("Come back next time!")
                  if z in [5]:
                      o = float(input("Enter a number to add:"))
                      p = float(input("Enter a number to add:"))
                      l = float(input("Enter a number to add:"))
                      v = float(input("Enter a number to add:"))
                      u = float(input("Enter another number to add:"))
                      print("The result is", + o + p + l + v + u)
                      print("Come back next time!")
  
  
  if b in ["Subtract", "subtract"]:
      e = float(input("Enter a number to subtract:"))
      f = float(input("Enter another number to subtract:"))
      print("The result is", + e - f)
      print("Come back next time!!")
  
  if b in ["Multiply","multiply"]:
      g = float(input("Enter a number to multiply:"))
      h = float(input("Enter another number to multiply:"))
      print("The result is", + g * h)
      print("Come back next time!!")
  
  if b in ["Divide","divide"]:
      i = float(input("Enter a number to divide:"))
      j = float(input("Enter another number to divide:"))
      print("The result is", + i / j)
      print("Come back next time!!")
  </code></pre>