Calculate the Power of a Number Python

PROGRAM TO CALCULATE POWER OF A NUMBER


import math base_number = float(input("Enter the base number: ")) exponent = float(input("Enter the exponent: ")) power = math.pow(base_number,exponent) print("Power is = ",power)


OUTPUT

Enter the base number: 2 Enter the exponent: 4 Power is = 16.0


Comments

Popular posts from this blog

Solve the Sudoku Python

Solve the Sudoku Java

Find Duplicates Java