Dremendo Tag Line

Input 2 integers and print the sum of their square roots using mathematical functions in Python

Mathematical Functions - Question 2

In this question, we will see how to input two integer numbers and print the sum of their square roots in Python programming using the mathematical functions. To know more about mathematical functions click on the mathematical functions lesson.

Q2) Write a program in Python to input two integer numbers and print the sum of their square roots using the sqrt() function.

Program

import math

print('Enter 2 integer numbers')
a=int(input())
b=int(input())
s=math.sqrt(a) + math.sqrt(b)
print('Sum of the square root = %f' %(s))

Output

Enter 2 integer numbers
25
9
Sum of the square root = 8.000000
video-poster