码迷,mamicode.com
首页 > 编程语言 > 详细

python中的pow()函数解释

时间:2018-04-15 20:52:45      阅读:978      评论:0      收藏:0      [点我收藏+]

标签:完全   tps   tail   csdn   detail   不同的   nbsp   log   不同   

转载自:https://blog.csdn.net/wuxiaobingandbob/article/details/47776209

   Python中pow(),里面可以有两个或三个参数,它们的意义是完全不同的。   

1、pow(x,y):这个是表示x的y次幂。        >>> pow(2,4)              16       >>> 

   2、pow(x,y,z):这个是表示x的y次幂后除以z的余数         

  >>> pow(2,4,5)
           1
    >>> 

python中的pow()函数解释

标签:完全   tps   tail   csdn   detail   不同的   nbsp   log   不同   

原文地址:https://www.cnblogs.com/star12111/p/8849195.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!