摘要: Exercise: In a factory a printer prints labels for boxes. For one kind of boxes the printer has to use colors which, for the sake of simplicity, are n 阅读全文
posted @ 2022-07-04 21:48 大序列 阅读(55) 评论(0) 推荐(0) 编辑
摘要: exercise: Solution: def paperwork(n, m): return m*n if m>=0 and n>=0 else 0 def paperwork(n, m): return max(m,0) * max(n,0) 阅读全文
posted @ 2022-07-04 19:04 大序列 阅读(18) 评论(0) 推荐(0) 编辑
摘要: Exercise: 奇偶判定:给两个整数判断是否是一奇数一偶数 solution: def lovefunc( flower1, flower2 ): return sum([flower1,flower2]) % 2 >0 :sum()函数 :% 求余数 阅读全文
posted @ 2022-07-04 15:44 大序列 阅读(47) 评论(0) 推荐(0) 编辑