Computer Science, asked by sahasruthi1910, 7 months ago

Write a Program that reverses an array of integers. in python

Answers

Answered by seejarani
3

Answer:

PROGRAM:

  • PROGRAM:#Initialize array.
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];print("Original array: ");
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];print("Original array: ");for i in range(0, len(arr)):
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];print("Original array: ");for i in range(0, len(arr)):print(arr[i]),
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];print("Original array: ");for i in range(0, len(arr)):print(arr[i]),print("Array in reverse order: ");
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];print("Original array: ");for i in range(0, len(arr)):print(arr[i]),print("Array in reverse order: ");#Loop through the array in reverse order.
  • PROGRAM:#Initialize array.arr = [1, 2, 3, 4, 5];print("Original array: ");for i in range(0, len(arr)):print(arr[i]),print("Array in reverse order: ");#Loop through the array in reverse order.for i in range(len(arr)-1, -1, -1):

Explanation:

pls follow me. i will follow back. pls mark as brainliest.

Similar questions