57.6k views
5 votes
the arrays numberarray1 and numberarray2 have 100 elements. write the code that copies the values in numberarray1 to numberarray2.

User Mark Essel
by
3.8k points

1 Answer

2 votes

import random

numberarray1 = []

numberarray2 = []

#Fill with the random values, you can modify this part as you wish.

for i in range(100):

numberarray1.append(random.randint(0,100))

#Copying

numberarray2 = numberarray1.copy()

#Print the last state.

print(numberarray2)

the arrays numberarray1 and numberarray2 have 100 elements. write the code that copies-example-1
User Belovoj
by
3.6k points