Question: write a python function.to calculate overlap e) Write a function that accepts two lists, each representations of two different squares. Compute the area of the

write a python function.to calculate overlap
e) Write a function that accepts two lists, each representations of two different squares. Compute the area of the overlap between the two squares. If the representations are not valid return -1 f) Test your overlap function with the following code: sql = 12,0,21 sq2 = 12,1,51 sq2 = 14,3, 11 sq4 = 12,5,31 sq5 = 16,4,-31 sq6 = 16,4, 'three'] print ("The overlap ob s tr(sal) =" and " + str(592) -"is" + str (overlap (sai, 592))) print("The overlap of " + str(sq2) - " and " + str(sq) + " " + str (overlap (92,998) print("The overlap of str(592) -" and " + str(594) - " is " + str (overlap (=q2, 594))} print("The overlap of - str(:q1) -" and " + str (594) -" is " + str (overlap (sq1, 594) >> print("The overlap of str(sq) =" and " + str (sas) -"i " + str (overlap (sqi, 595} } } print("The overlap of + str(sql) -" and " + str(sq) " is " + str (overlap (sal, 595) > >
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
