输入一个数字,输出它的1次方,2次方,3次方...10次方
# coding = utf-8
def fib(x):
result = 1
for i in range(11):
result = result * x
print result
return result
fib(2)
输入一个数字,输出它的1次方,2次方,3次方...10次方
# coding = utf-8
def fib(x):
result = 1
for i in range(11):
result = result * x
print result
return result
fib(2)
本文标题:Python学习:某个数的n次方
本文链接:https://www.haomeiwen.com/subject/gdcwettx.html
网友评论