for n in range(2, 10):
for x in range(2, n):
if n % x == 0:
print(n, 'equals', x, '*', n//x)
break
else:
print(n, 'is a prime number')
There are two issues here:
1. TabError: Incosistent use of tabs and spaces in indentation
2. More importantly I don't understand the logic behind this code that leads to this output: