while x !="exit" or y !="exit":
will return true unless both x and y = 'exit'
The behavior you're describing would require
while x !="exit" and y !="exit":
in order to allow either x or y to end the while loop.
The other behavior you're asking for (breaking immediately after 'exit' is entered) would be easily accomplished by including the rest of the loop in an if clause to test for 'exit'
The rest of the erratic behavior you're describing (print statements) is like caused by indentation error.
Here's a version of what I think you're describing, using your original code that works in Python 3.3
x=0
y=0
while x !="exit" and y !="exit":
x= input("Enter your name: ")
if x != 'exit':
y= input("Enter your grade: ")
if y!= "exit":
g=int(y)
if g<50 or g>100:
print("Invalid input")
else:
if g>=50 and g<70:
print("not a good grade,work harder")
elif g>=70 and g<90:
print("Nice grade, try to get higher next time")
else:
print("Excellent grade!")
print("Good bye")