7、使用递归函数写20的阶乘
摘要:
题目: 使用递归函数写20的阶乘:1x2x3...19x20 解题思路: 1、自定义number递归函数。 2、每阶乘一次参数减1 答案: result = 0 def number(num): if num ==1: return 1 result = num * number(num-1) re 阅读全文
posted @ 2022-10-21 17:12
乐之之
阅读(332)
评论(0)
推荐(0)
浙公网安备 33010602011771号