问:写个程序判断 input 是否为偶数,这里是用户可能输入的数据: [1,2,3,4] 答: def is_even(num): if num == 1: return False elif num == 2: return True elif num == 3: return False elif num == 4: return True
这就是个 ad hoc solution
charlie21
2022-10-07 15:53:40 +08:00
when a demand is coming, you come up with a quick and maybe dirty solution or workaround. The whole scenario represents a workaround. The quick solution that is taken by you (consumed by you) is an ad-hoc.