#This is the file twoSounds.py for Q3 of A2.
#You may insert lines as needed and sizes of gaps do
#not indicate anything about the length of the portion
#of the question. Do not delete comments.
#Begin your specification here

#End your specification here
def twoSounds(sound1,sound2): #do not change this line
    length1 = getLength(sound1)
    length2 = getLength(sound2)
    #Write your code for 3b here
    if (): #write a condition for length1 being a bigger.
        shorterSound = #which sound is shorter
        shorterLength = #what is the length of the shorter sound
        longerLength = #what is the length of the longer sound
    else:
        shorterSound = #which sound is shorter here?
        shorterLength = #what is the length of the shorter sound?
        longerLength = #which length is longest?
    #End your code for 3b here
    #3c)Construct the sound you will eventually return
    target = makeEmptySound() #calculate the length of the target
    targetIndex =0
    for sourceIndex in range(): #fill in this range
       if (shorterSound==0):
          #get and set your sample values appropriately
       else:
          #get and set your sample values appropriately
       targetIndex = targetIndex+1
    #End your code for 3c here.
    #3d) Build the new values
    for i in range(): #fill in this range
       if (shorterSound==0):
          #get your two sample values from appropriate indices
          sampleValue1 = 
          sampleValue2 = 
          sampleValue = sampleValue1+sampleValue2
          #set your target at the appropriate index to sampleValue
          
       else:
          #get your two sample values from appropriate indices
          sampleValue1 =
          sampleValue2 =
          sampleValue = sampleValue1+sampleValue2
          #set your target at the appropriate index to sampleValue
       targetIndex= targetIndex + 1
    #End your code for 3d here.
    #3e) Reverse the remainder of the larger sounds
       #Do this on your own. I'd suggest using a helper function
    #End 3e here
    return target
    #End your function here.
    
#Insert any helper functions below this block of comments.
#I strongly advise using helper functions for this question.
#You may copy them from material on the course website.

