Python began to study, sometimes terrible stupids attack.
A number of tasks with this cycle, it seems, is solved and understandable,
I can’t understand how to formulate the solution?
Determine the sum of all elements of the sequence of 0.
in this and next tasks of the number following the zero, not the following. They are taken into account.
i.e. The problem must be solved in the framework of the studied material:
- input-output, arithmetic operations
- conditional instruction
- operations with entire and material numbers
- cycle for
- lines
- the While
that's just what I did not understand.
I = 0 when int ( input () & gt; 0 : i += int ( input () print (i) pre> but in this case elements are summarized without the first,
i.e. In the order, as included.if I do this,
i = 0 a = 0 when int ( input () & gt; 0 : i += " 1 for j in range ( 0 : a): a += int span> ( input ()) print (a)then the numbers for the input.
In general, I understand that I am doing something wrong.
question@mail.ru
·