Question: Starter Code: # LAB3 #Due Date: 02/27/2021, 11:59PM ### Collaboration Statement: #REMINDER: All functions should NOT contain any for/while loops or global variables.

 Starter Code: # LAB3 #Due Date: 02/27/2021, 11:59PM """ ### Collaboration

Starter Code:

# LAB3 #Due Date: 02/27/2021, 11:59PM

""" ### Collaboration Statement: """

#REMINDER: All functions should NOT contain any for/while loops or global variables. # Use recursion, otherwise no credit will be given

def lineUp(aList1, aList2): ''' >>> lineUp([5, 8.9, 'a'], [6, 5, 4, 21, -9, 's', 8.9, 45, 1, 1, 'a', 3]) True >>> lineUp([5, 8.9, 'a'], [6, 5, 4, 21, -9, 'a', 8.9, 45, 1, 1, 3]) False >>> lineUp([5, 8.9, 'a'], [6, 5, 4, 21, -9, 'a', 45, 1, 1, 3]) False >>> lineUp([2, -6, 5, 3], [6, 1, 0, 2, -6, 4, 12, 5, 2, 3]) True ''' ## YOUR CODE STARTS HERE pass

def removing(aList): """ >>> removing([7, 4, 0]) [7, 4, 0] >>> myList=[7, 4, -2, 1, 9] >>> removing(myList) # Found(-2) Delete -2 and 1 [7, 4, 9] >>> myList [7, 4, -2, 1, 9] >>> removing([-4, -7, -2, 1, 9]) # Found(-4) Delete -4, -7, -2 and 1 [9] >>> removing([-3, -4, 5, -4, 1]) # Found(-3) Delete -3, -4 and 5. Found(-4) Delete -4 and 1 [] """ ## YOUR CODE STARTS HERE pass

def neighbor(n): """ >>> neighbor(24680) 24680 >>> neighbor(2222466666678) 24678 >>> neighbor(0) 0 >>> neighbor(22224666666782) 246782 >>> neighbor(2222466666625) 24625 """ ## YOUR CODE STARTS HERE pass

pls do not copy other people's answer, I don't really understand that

removing(aList) (3 points) Takes a list of integers and returns a list identical to aList, but when a negative number appears, the function deletes the negative number and the next x-l elements, where x is the absolute value of the negative number. The function should not mutate aList. Input list aList A list that contains only integers Output list A list identical to aList where we delete several elements from that sequence >>> removing([7, 4, -2, 1, 9]) # Found -2: Delete -2 and 1 [7, 4, 9] >>> removing([-4, -7, -2, 1, 9]) # Found -4: Delete -4, -7, -2 and 1 [9]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!