Category Archives: Python Exercie

Python example 3 – Solver number power

Hello World, Welcome to projectsplaza.com. In this example, we will calculate the power of the number. We will take the number and power from the user and calculate it with python function. We will do this in the following steps.

  • define power_multiply function
  • get to input from the user number and power
  • calculate the number of power with ** expression
def power_multiply():
    number=int(input('Enter the number '))
    power=int(input('Enter the power '))
    print(number**power)
power_multiply()

Output of this example

power_multiple_in_python