Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
shelf_a = [10, 5, 8]
shelf_b = [3, 12, 4]
combined = []
for index in range(len(shelf_a)):
combined.append(shelf_a[index] + shelf_b[index])
print("Shelf A:", shelf_a)
print("Shelf B:", shelf_b)
print("Combined:", combined)