예제 #1
0
def tc1():
	a = [1,2,3,4]
	b = [5,6,7,8]
	assert arithmetic.listsum(a,b) == [6, 8, 10,12]
	assert arithmetic.listsub(a,b) == [4, -4, -4,-4]    
	return True
예제 #2
0
def tc2():
	a = [[1,2],[3,4]]
	b = [[5,6],[7,8]]
	assert arithmetic.listsum(a,b) == [[6, 8], [10,12]]
	assert arithmetic.listsub(a,b) == [[4, -4], [-4,-4]]  
	return True
def tc4():
    A = [3, 4, 6, 7]
    B = [1, 3, 6, 3]
    arithmetic.listsub(A,B) == [2, 1, 0, 4]
    return True
def tc5():
    List1=[3,5,6]
    List2=[3,7,2]
    List3=[0,-2,4] # output
    arithmetic.listsub(List1,List2) == List3
    return True
def tc2():
    pointA = [ 22, 44, 83 ]
    pointB = [ -17, 11, -25 ]
    pointC = [ 5, 55, 61 ] # output
    arithmetic.listsub(pointA,pointB) == pointC
    return True