d=0u=0liczba=float(input())while liczba!=0: if liczba>0: d=d+1 else: u=u+1 liczba=float(input())print("(+)",d)print("(-)",u)
67 23 14 -18.2 -3.1415 -6.7 0
('(+)', 3) ('(-)', 3)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!