title: Program Will Quit With an "else" Statment
body: <p>I am trying to make a Python Script that will tell you what day you were born on based off of your DOB.</p>
  
  <p>But I needed to make it so if you were born on either the months of "February","April","June","September","November" it would need to have a different equation, so for now I made it so if you put your date as "6" (June) it would just </p>
  
  <pre><code>print("This Is True")
  </code></pre>
  
  <p>So I arranged it like this</p>
  
  <pre><code>if M == '2':
      i = 30
      X = 'Answer'
  
  if M == '4':
      i = 30
      X = 'Answer'
  
  if M == '6':
      i = 30
      X = 'Answer'
  
  if M == '9':
      i = 30
      X = 'Answer'
  
  if M == '11':
      i = 30
      X = 'Answer'
  
  os.system('CLS')
  
  
  
  
  
  
  if X == 'Answer':
      print('This Is True')
      input()
  
  elif X != 'Answer':
      print('This is False')
      input()
  </code></pre>
  
  <p>yet when It is not one of the Months listed above it will </p>
  
  <pre><code>print('This is False')
  </code></pre>
  
  <p>yet when I enter something like "10" (October) the program will shut and not display "This is False"</p>
  
  <p>I know I have asked a lot today but once again (if you couldn't tell by the code) I am VERY new</p>
  
  <p>If anyone would also like to point out any tips on where the code could potentially be better here is all of it:</p>
  
  <pre><code>import os
  
  M = 'Monday'
  T = 'Tuesday'
  W = 'Wednesday'
  TT = 'Thursday'
  F = 'Friday'
  S = 'Saturday'
  SS = 'Sunday'
  
  print('Enter Your DOB as DD/MM/YYYY: ')
  
  D = input("Day: ")
  
  
  
  
  M = input("Month: ")
  
  
  
  if M == '2':
      i = 30
      X = 'Answer'
  
  if M == '4':
      i = 30
      X = 'Answer'
  
  if M == '6':
      i = 30
      X = 'Answer'
  
  if M == '9':
      i = 30
      X = 'Answer'
  
  if M == '11':
      i = 30
      X = 'Answer'
  
  
  
  
  Y = input("Year: ")
  if (len(Y)) &lt; 4:
      print('You Have Entered A Too Short Or Too Long of a Year')
      input()
      os._exit(0)
  
  
  os.system('CLS')
  
  
  
  
  
  
  if X == 'Answer':
      print('This Is True')
  
  
  elif X != 'Answer':
      print('This is False')
      input()
  
  
  
  
  os.system('CLS')
  
  
  
  print("You Were Born On A:")
  
  
  input("Press ENTER To Exit")
  </code></pre>