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
|
869 Discussions
|
Please Login in order to post a comment
This is how you find angle MBC with degree sign: Syntax:
import math ab=int(input()) bc=int(input()) print(f"{str(round(math.degrees(math.atan2(ab,bc))))}\u00B0")
import math
a,b= int(input()), int(input())
print(str(round(math.degrees(math.atan2(a,b))))+chr(176))
Being well versed in the math class helps the most:
import math
ab = int(input()) bc = int(input())
angle_rad = math.atan2(ab, bc) angle_deg = math.degrees(angle_rad)
print(round(angle_deg)) out is 45 just number but need 45° how
Here is HackerRank Find Angle MBC solution in Python - https://programmingoneonone.com/hackerrank-find-angle-mbc-solution-in-python.html