December 9th, 2012, 12:32 PM
i am noob at python and i need to do this qustion
Input 10 positive integers. Output the sum of the integers input in the even places (second, fourth,…) (isumevenplace). Output the sum of the integers input in the odd places ( first, third,…) (isumoddplace).
and i need to flowchart but this is the bigest problem
i cant understand this staff can some one explain me please
December 9th, 2012, 01:50 PM
Please investigate the sum function
Indexing an array (for example, objects from odd indexes of a list are LIST[1::2])
You'll need a way to prompt for data. The usual answer with the input function might differ depending on the version of python you use. How much error testing do you want? What if the user mistypes an invalid number? Handling user input consumes a large fraction of the total programming effort.
If you thought of a way to solve the problem without lists that's ok too---probably more efficient. The nice thing about lists is you'll have the data in memory for re-use.
[/code] are essential for python code and Makefiles!