Computer Science, asked by julipandit2017, 3 months ago

Write a program to initialize an array with any 10 numbers and create the numbers in the odd position ​

Answers

Answered by Anonymous
0

 {\boxed{\underline{\purple{\bf\tt{Program:} } }}}

arr = [A, B,C, D, E,F, G,H,I,J]

print("These elements are at odd position in the array: ")

for i in range(0, len(arr), 2):

 \: \: \: \: print(arr[i])

 {\boxed{\underline{\orange{\bf\tt{Output :} } }}}

These elements are at odd position in the array:

A

C

E

G

I

Similar questions