Question:
- Given a right angled triangle PQR, right angled at Q. Find angle PQS, where S is the mid-point of the hypotenuse(side PR). You will be given two integers denoting sides PQ and QR respectively.
- Round off your answer to the nearest Integer.
Below are for input instruction:
- You will get integer value for side PQ in the your first line input
- You will get integer value for side QR in the your second line input
Output instructions:
- Output angle PQS should be rounded off to the nearest integer
Sample input:
24
12
Output:
27
Solution:
import math def main(): sidePQ = int(input()) sideQR = int(input()) tan = sidePQ/sideQR anglePQS = round(math.degrees(math.atan(tan))) print(anglePQS) main()