+ 1
lift - python
There are two elevators ("left"/"right") in the building with three floors, numbered from 0 to 2. Write a program that takes the following values: left Elevator - floor ,which is the left Elevator right Elevator - floor, on which is the right Elevator caused by on - floor, on which was caused by the lift The program should return the name of the Elevator, which is closer to the floor, which was caused by Elevator ("left"/"right"). If both elevators are located at the same distance from the called floor, choose the right one. You can expect that the input data will always be in the 0-2 interval. Examples: 0, 1, 0 = > "left" 0, 1, 1 = > "right" 0, 1, 2 = > "right" 0, 0, 0 = > "right" 0, 2, 1 = > " right"
4 Answers
+ 1
if there are only two elevators, why are there 3 numbers in each example?
+ 1
is that how it has to be set up? It seems so extra. I'm sorry, if there are 2 elevators I'm expecting two numbers.
Also what do the numbers represent? You made it seem as if they are there to show the amount of floors from ground level.
+ 1
_nrkvv_ what have you tried so far?or you can't just understand the question and looking for explaination?
0
Slick , third input is for elevator (floor where are elevator)