Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- problem_type = input('Что нужно найти? ')
- if problem_type == 'расстояние' or problem_type == 'перемещение'\
- or problem_type == 'Расстояние' or problem_type == 'Перемещение':
- print('Выберите тип движения:')
- print('1.Равномерное')
- print('2.Равноускоренное')
- type_of_movement = int(input())
- while type_of_movement not in range(1, 3):
- print('Попробуйте еще раз')
- type_of_movement = int(input())
- if type_of_movement == 1:
- speed = int(input('V = '))
- print('Выберите единицу измерения скорости:')
- print('1.км/ч')
- print('2.м/мин')
- print('3.м/с')
- print('4.см/с')
- speed_unit = int(input())
- while speed_unit not in range(1, 5):
- print('Попробуйте еще раз')
- speed_unit = int(input())
- time = int(input('t = '))
- print('Выберите единицу измерения времени')
- print('1.часы')
- print('2.минуты')
- print('3.секуды')
- time_unit = int(input())
- while time_unit not in range(1, 4):
- print('Попробуйте еще раз')
- time_unit = int(input())
- distance = speed * time
- if speed_unit == 1 and time_unit == 1:
- print(distance, 'км')
- elif speed_unit == 2 and time_unit == 2:
- print(distance, 'м')
- elif speed_unit == 3 and time_unit == 3:
- print(distance, 'м')
- elif speed_unit == 4 and time_unit == 3:
- print(distance, 'см')
- else:
- print('Программа не может это решить')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement