I wanted to validate the data type as int or float in this simple code, I've gone wrong somewhere and the error message "Enter an integer!" shows up no matter what. I have already tried putting a == instead of != and putting all other statements after the if, but the problem persists.
def menuLoop():
marks = input("Please Enter the Obtained Marks: ")
if type(marks) != int or float:
print("Enter an integer!")
menuLoop()
else:
if int(marks) >= 75:
print("A")
menuLoop()
elif marks >= 60:
print("B")
menuLoop()
elif marks >= 35:
print("C")
menuLoop()
elif marks < 35:
print("D")
menuLoop()
menuLoop()