title: Loop Not Running When the Condition Has Been Met
body: <p>I am trying to implement input validation in the form on a while loop. When I enter a negative number for the midterm grade the program don't ask again. I've tried replacing the or with an and in the while again line but that still doesn't change the outcome. The input validation works for the while assessments line but not on the while again line. I believe the issue is with this piece of the code. </p>
  
  <p>Edit:
  When I enter a character other than N or Y the program prints the grade. The program should ask the user what grade the got on the midterm again.</p>
  
  <pre><code>def again():
      print ("again")
      again = 0
      while again != "Y" or again != "N":
          again = input("Do you want to calculate the grade again? Please enter either Y or N. ")
      if again == "Y":
          main()
  </code></pre>
  
  <p>The whole code is posted below for context.</p>
  
  <pre><code>import sys
  def main():
      #Get the name and # of assessments
      named = ("name")
      un = name(named)
      tp = 0
      s= 0
      assessments = 0
      while assessments &lt;= 0:
          assessments = int(input("how many assessments have you completed?"))
  
  
      #Get the total of assessments including homework
      for x in range(1,assessments + 1):
          g = float(input("grade of assessment"))
          tp += g
  
      scoree = tp / assessments
      finalG= finals(scoree)
      scoring(finalG)
      p(un)
      again()
  
  
  def scoring(score):
  
      if score &gt;= 97:
          print("You have an A+ in the class!")
          print ("Your grade as a percentage is:", score, "%",sep="") #Print the percentage
          sys.exit()
      if score &gt;= 93 and score &lt;= 96.9:
          print("You have an A in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 90 and score &lt;= 92.9:
          print("You have an A- in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 87 and score &lt;= 89.9:
          print("You have an B+ in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 83 and score &lt;= 86.9:
          print("You have an B in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 80 and score &lt;= 82.9:
          print("You have an B= in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 77 and score &lt;= 79.9:
          print("You have an C+ in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 73 and score &lt;= 76.9:
          print("You have an C in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 70 and score &lt;= 72.9:
          print("You have an C= in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 67 and score &lt;= 69.9:
          print("You have an D+ in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      if score &gt;= 63 and score &lt;= 66.9:
          print("You have an D in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      elif score &gt;= 60 and score &lt;= 62.9:
          print("You have an D- in the class!")
          print("Your grade as a percentage is:", score,"%",sep="")
          sys.exit()
      else: 
          print("You have an F")
          print("Your grade as a percentage is:", score,"%",sep="")
  
  
  #ask for their name with "input"
  def name(names):
      names = input("Could you please tell me what is your name?:")
      return names
  
      #Print the grade of the student with the name of the student in the same function
  def p(p2):
      print("is your current average is",p2)
  
  # asks if the use wants to run the program again?
  def again():
      print ("again")
      again = 0
      while again != "Y" or again != "N":
          again = input("Do you want to calculate the grade again? Please enter either Y or N. ")
      if again == "Y":
          main()
  #ask the user their final grades and adds it to the calculation
  def finals(fgrade):
      mtg = 0
      ma = input("Did you take your midterm? Like before please enter either Y or N")
      if ma == "Y":
          while mtg &lt;= 0:
              mtg = float(input("what is the midterm grade you got back?"))
          fgrade = mtg * .2 + fgrade *.8
      return fgrade
  
      if ma == "N":
          return fgrade
  main()
  </code></pre>