Do not code like this. Please, read the hints by the accepted answer. I tried to remove the junk but I coundn't.
Code
import sys
a = []
i=0
for line in sys.stdin:
try:
n = float(line)
a.append(n)
i+=1
except ValueError:
print 'Number please!';
continue
if n < 0:
if i % 2 == 1:
a.pop(-1)
break
ratios = []
ratios.append( a.pop(-1) / a.pop(-2) )
print a[-1]