I am brand new to coding and trying to learn Python. I cannot work out how to code an elif statement such that if the variable is an integer there is a certain output, but if it is not an integer then something else is printed. I keep getting an error. I am trying to write a program that can analyse the variable "x" and if x is a number it will print saying it is below 2 or 2 or more, but if x is anything else including a string, it will print "something else"
x = 2
if x < 2:
print("Below 2")
elif x >= 2:
print("Two or more")
else:
print("Something else")
x = world
if x < 2:
print("Below 2")
elif x >= 2:
print("Two or more")
else:
print("Something else")