Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- problem_type = input('Что нужно найти? ')
- if problem_type.lower() == 'расстояние' or problem_type.lower() == 'перемещение':
- print('Введите скорость с единицей измерения через пробел:')
- speed, speed_unit = input('V = ').split()
- speed_distance_unit, speed_time_unit = speed_unit.split('/')
- speed = int(speed) * distance_units.get(speed_distance_unit) / time_units.get(speed_time_unit)
- print('Введите время с единицей измерения через пробел:')
- time, time_unit = input('t = ').split()
- time = int(time) * time_units.get(time_unit)
- print('Введите ускорение с единицей измерения через пробел, квадрат опустите')
- print('Если движение равномерное введите 0')
- acceleration = input('a = ')
- if acceleration != '0':
- acceleration, acceleration_unit = acceleration.split()
- acceleration_distance_unit, acceleration_squared_time_unit = acceleration_unit.split('/')
- acceleration = int(acceleration) * distance_units.get(acceleration_distance_unit) / squared_time_units.get(acceleration_squared_time_unit)
- else:
- acceleration = int(acceleration)
- print(distance(speed, time, acceleration), 'м')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement