Dremendo Tag Line

Input 2 integers and print the square root of the power of the numbers using mathematical functions in Python

Mathematical Functions - Question 6

In this question, we will see how to input 2 integer numbers and print the square root of the power of the numbers ab in Python programming using the mathematical functions. To know more about mathematical functions click on the mathematical functions lesson.

Q6) Write a program in Python to input 2 integer numbers and print the square root of the power of the numbers ab.

Program

import math

print('Enter 2 integer numbers')
a=float(input())
b=float(input())
p=math.pow(a,b)
sr=math.sqrt(p)
print('Square root of power %f = %f' %(p,sr))

Output

Enter 2 integer numbers
3
2
Square root of power 9.000000 = 3.000000
video-poster