SHARE
TWEET

Untitled

a guest Jan 26th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. problem_type = input('Что нужно найти? ')
  2. if problem_type.lower() == 'расстояние' or problem_type.lower() == 'перемещение':
  3.     print('Введите скорость с единицей измерения через пробел:')
  4.     speed, speed_unit = input('V = ').split()
  5.     speed_distance_unit, speed_time_unit = speed_unit.split('/')
  6.     speed = int(speed) * distance_units.get(speed_distance_unit) / time_units.get(speed_time_unit)
  7.     print('Введите время с единицей измерения через пробел:')
  8.     time, time_unit = input('t = ').split()
  9.     time = int(time) * time_units.get(time_unit)
  10.     print('Введите ускорение с единицей измерения через пробел, квадрат опустите')
  11.     print('Если движение равномерное введите 0')
  12.     acceleration = input('a = ')
  13.     if acceleration != '0':
  14.         acceleration, acceleration_unit = acceleration.split()
  15.         acceleration_distance_unit, acceleration_squared_time_unit = acceleration_unit.split('/')
  16.         acceleration = int(acceleration) * distance_units.get(acceleration_distance_unit) / squared_time_units.get(acceleration_squared_time_unit)
  17.     else:
  18.         acceleration = int(acceleration)
  19.     print(distance(speed, time, acceleration), 'м')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top