Total Pageviews

Wednesday, April 9, 2014

math.pow

Math.pow()
ប្រើសំរាប់ត្រឡប់នូវ x^y^(ដែលអាចប្រើ ​Expression x^y to compute this value)
Syntax: math.pow (x,y)
X(តំរូវការ)វាជាចំនួនលេខ the base
Y(តំរូវការ)វាជាចំនួនលេខ the exponent
សូមមើលកូដះ
print(math.pow(100,0))  ---->  1
print(math.pow(7,2))    ---->  49
print(math.pow(2,8))    ---->  256


No comments:

Post a Comment