Skip to content

Instantly share code, notes, and snippets.

@unilecs
Created June 13, 2019 05:17
Show Gist options
  • Save unilecs/3e35a4475b2fe6130bfb13b926fd5f98 to your computer and use it in GitHub Desktop.
Save unilecs/3e35a4475b2fe6130bfb13b926fd5f98 to your computer and use it in GitHub Desktop.
Задача: Го-о-ол!
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