[Tutor] help with program
Enid Villalobos
alex.ochoa0429 at gmail.com
Sun Nov 6 20:36:12 EST 2022
I need to create a reverse program using the reverseArray function
my program works and runs as it should but they want me to define the
reverseArray function
I am copying my program below
#The original array
original_array = [9, 8, 7, 6, 5]
print("original contents of array:",original_array)
original_array.reverse() #reversing using reverse()
print("Reversed contents of array:",original_array)
when i run this program my output is this:
original contents of array [9,8,7,6,5]
reverse contents of array [5,6,7,8,9]
But they want me to use the array function
please help
More information about the Tutor
mailing list