0

Write a function called manipulate_data which will act as follows: When given a list of integers, return a list, where the fi

here is my code def manipulate_data(numbers): count=0 summation=0 for number in numbers: if number%2==0: count+=1 else: summation+=number numbers.append(count) numbers.append(summation) return numbers

17th Sep 2016, 1:57 PM
Dennis
1 Respuesta
+ 1
My psychic abilities allow me to understand what you want to do: def manipulate_data(numbers): count=0 summation=0 for number in numbers: if number%2==0: count+=1 else: summation+=number return [count, summation]
17th Sep 2016, 2:55 PM
Zen
Zen - avatar