Exemple #1
0
def eval_1():
  fname = __name__ + "." + sys._getframe().f_code.co_name

  from code import Q9
  from mycode import even
  l = list(range(10))
  random.shuffle(l)
  sub = lambda: Q9.even_elements(l)
  ref = lambda: even.even_elements(l)
  return eval_matfun(fname, sub, ref)
def eval_1():
  fname = __name__ + "." + sys._getframe().f_code.co_name

  from code import Q9
  from mycode import even
  l = list(range(10))
  random.shuffle(l)
  o = Q9.even_elements(l)
  e = even.even_elements(l)
  if(equals(o, e)):
    return (1, fname)
  else:
    return (0, fname + ": wrong answer")