Find Angle MBC - Hackerrank solution

 

Find Angle MBC


Objective:


ABC is a right triangle,90 at B.
Therefore, .Angle Abc=90

Point M is the midpoint of hypotenuse AC.

You are given the lengths AB and BC.
Your task is to find Angle MBC(angle theta as shown in the figure) in degrees.


Solution:

def calc_angle(AB, BC):
    from math import atan2, degrees

    print(str(round(degrees(atan2(AB, BC)))) + '°')

calc_angle(int(input()), int(input()))



Note:

This Code is Verified by all Test Cases.If any error occurs then Comment correct code Below in comment box.

Disclaimer:-

The above hole problem statement is given by hackerrank.com, but the solution is generated by the CodexRitik . if any of the query regarding this post or website fill the following contact form Thank You.

Find Angle MBC - Hackerrank solution Find Angle MBC - Hackerrank solution Reviewed by CodexRitik on June 13, 2020 Rating: 5

No comments:

Powered by Blogger.