Look at your code:
x=2**i
for i in range(0,8):
print(x)
the value in
x
doesn't change inside the loop, so you will get 2 to the power of one printed each time.
Move the calculation inside the loop, and it'll work:
for i in range(0,8):
x=2**i
print(x)
Or better:
for i in range(0,8):
print(2**i)
And discard
x
completely!