Python code for multiplying an element by 2 digit is odd index for a given list containing both numbers and strings
Answers
Answered by
1
arr = {1, 2, 3, 4, 5, 6}
Output : Even Index Product : 15
Odd Index Product : 48
Explanation: Here, N = 6 so there will be 3 even
index positions and 3 odd index positions in the array
Even = 1 * 3 * 5 = 15
Odd = 2 * 4 * 6 = 48
Input : arr = {10, 20, 30, 40, 50, 60, 70}
Output : Even Index Product : 105000
Odd Index Product : 48000
Explanation: Here, n = 7 so there will be 3 odd
index positions and 4 even index positions in an array
Even = 10 * 30 * 50 * 70 = 1050000
Odd = 20 * 40 * 60 = 48000
Answered by
0
- 48000answer..........
Similar questions