We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Math
- Find Angle MBC
- Discussions
Find Angle MBC
Find Angle MBC
Sort by
recency
|
865 Discussions
|
Please Login in order to post a comment
Here is HackerRank Find Angle MBC solution in Python - https://programmingoneonone.com/hackerrank-find-angle-mbc-solution-in-python.html
import math ab= float(input()) bc= float(input()) angle_mbc= math.degrees(math.atan(ab/bc)) print(str(round(angle_mbc)) + chr(176))
Law of Cosines
import math x = int(input()) y = int(input()) a = math.sqrt((x*x)+(y*y)) b = a/2
z = math.acos((y*y)/(2*y*b)) k = math.degrees(z) print(f'{int(round(k))}\u00B0')
print(str(round(math.atan(int(input())/int(input()))/math.pi*180)) + chr(176))