Quiz
Topic sourcedef quadratic(a, b, c): z = [False for i in (a, b, c) if not isinstance(i, (int, float))] if z: raise TypeError('bad input type') delta = b*2 - 4ac x1, x2 = None, None if delta >= 0: x1 = (-b + math.sqrt(delta))/(2 a) x2 = (-b - math.sqrt(delta))/(2 * a) return x1, x2
- 1
电缆_沉迷音游无法自拔
测试数据:1,2,1 通过 1,2,'1' 通过 1,3,1 通过 0,3,1 通过