Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import sqrt
- from numpy import arange
- v = float(input('Введите данные для v: '))
- t = float(input('Введите данные для t: '))
- a = float(input('Введите данные для a: '))
- def compute_formula(a=a, v=v, t=t):
- if a > v*t:
- A = v*t + sqrt(2*a**2 - (v*t)**2)
- B = (A - t)*v
- print('A =', A)
- print('B =', B, end='\n\n')
- else:
- print('Произошел выход за ОДЗ!')
- print('Cчитаем для фиксированных параметров t и a')
- for v1 in arange(v+2, v+7, 0.3):
- compute_formula(v=v1)
- print('Cчитаем для фиксированных параметров a и v')
- for t1 in arange(t+5, t+10, 0.5):
- compute_formula(t=t1)
- print('Cчитаем для фиксированных параметров t и v')
- for a1 in arange(a+10, a+25, 5):
- compute_formula(a=a1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement