Computer Science, asked by LaveezaTahir, 2 months ago

write a code to get two arrays from user of size 15. Each then generate a third array which contain the elements of array 1 and array 2 .Also make sure that data members of third array are sorted​

Answers

Answered by jai696
1

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

while True:

li = []

for _ in range(2):

li.append(list(map(int, input("Enter 15 nums: ").split())))

li_1, li_2 = li

if len(li_1 + li_2) != 30:

print("\nEnter exactly 15 items.")

continue

else:

li_3 = li_1 + li_2

li_3.sort()

print(li_3)

break

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions