Sunday, March 28, 2021

Find Power of a Number in Python

Write a program to ask the user to input an integer value and exponent value then, the program will compute the power value and display the result on the screen.

 am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




 Program Listing


# Jake R. Pomperada, MAED-IT, MIT
# March 28, 2021 Sunday 10:23 AM
# Bacolod City, Negros Occidental
import math
print("@==================================================@")
print(" Find Power of a Number in Python ")
print("@===================================================@")
print("")
number = int(input("Enter any Positive Integer : "))
exponent = int(input("Enter Exponent Value : "))
print("")

power = math.pow(number, exponent)

print("The Result of {0} Power {1} = {2}".format(number, exponent, power))
print("")
print("===== THE END OF PROGRAM ===== ")

No comments:

Post a Comment