-
-
Save unilecs/3e35a4475b2fe6130bfb13b926fd5f98 to your computer and use it in GitHub Desktop.
Задача: Го-о-ол!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import atan, pi | |
# Вернуть угол в градусах | |
def goal_angle(d, f, s): | |
if s == 0: return 180 | |
return abs( atan(f / s) + atan((d - f) / s) ) * 180 / pi | |
d, f, s = map(float, input('Please input D, F, S via space: ').split(' ')) | |
alpha = goal_angle(d, f, s) | |
print(f'Angle = {alpha:.2f}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment