why do i get NZEC error in python

cook your code here

t = int(raw_input())
while t>0:
n = int(raw_input())
a, b = 1, 2
while b <= n:
a = b
b *= 2
print a 

i also tried raw_input().strip()

How do i remove NZEC error. EOF

hello,i am not at all python coder and i have tried python only one time before this question so my solution might be wrong but i tried my best to make it right.See what i think is that your code have problem with [indentation][1] and also you forgot to decrement t variable i have modified your code but not at all sure if its correct or not here’s the link to modified


[2].(kindly ignore if its wrong :P :D)

  [1]: http://www.diveintopython.net/getting_to_know_python/indenting_code.html
  [2]: http://ideone.com/HNh8sl

I think problem is first while loop because there is no statement to decrement the value of variable t.
Add t-=1 in first while loop.