pow()


Youtube Live session on Tkinter

pow(x,y) returns x raised to the power of y ( input numbers ) .
Here are some examples with different type of numbers.
import math
print(math.pow(2,3))   # 8.0
print(math.pow(2,-3))  # 0.125
print(math.pow(-2,-3)) # -0.125
print(math.pow(-2,3))  # -8.0
Using floats
import math
print(math.pow(2.2,3))   # 10.648000000000003
print(math.pow(2.2,-3))  # 0.09391435011269719
x is negative, and y is not an integer then pow(x, y) is undefined and raise ValueError.
print(math.pow(-2,3.3)) 
print(math.pow(-2,3.3)) 
Above code will generate error

floor() & ceil() modf() log1p()
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer