Solution to Quiz 4, Version B 1) (a) len(str(random.randint(1, 4)*22)) Well-formed 2 int (b) sys.maxint+2 Well-formed 9223372036854775809 long (c) 5 < 8 and (100/(len("0")-1)) Well-formed ZeroDivisionError (d) abs(5 - 25) < 15 and 0.5 Well-formed False bool (e) 2/math.trunc(1.5)+200L Well-formed 202 long (f) 5 < 8 or (100/(len("0")-1)) Well-formed True bool (g) bin(len(str(10<20))) Well-formed 0b100 str (h) 4L*len("Problem1")/(len("Exam1")%3)+2.0 Well-formed 18.0 float (i) -4*-3**2+-len(str(66)) Well-formed 34 int (j) bool(math.sqrt((-1)**100)) Well-formed True bool 2) def nextPerfect(M): while (factorSum(M) - M) != M: M = M + 1 return M Rubric: Properly makes calls to the helper function - 3pts Makes proper comparison to determine a Perfect - 3pts No syntax Errors - 2pts Properly returns the nextPerfect numbre - 2pts