05 2015 档案
摘要:1 def fact(n):2 if n==1:3 return 14 return n*fact(n-1)5 6 n=int(raw_input("Please Input The Number of N: "))7 print fact(n)
阅读全文
摘要:1 def my_abs(x):2 if x>=0:3 return x4 else:5 return -x6 7 z=int(raw_input("Please Input The Number You Want To Get Abs: "))8 ...
阅读全文
摘要:1 #定义X的N次方的函数,然后调用函数 2 def power(x,n): 3 s=1 4 while n>0: 5 n=n-1 6 s=s*x 7 return s 8 9 a=power(5,2)10 b=power(5,3)11 p...
阅读全文
浙公网安备 33010602011771号