Question: using python, please show how you import the text file. Thank you. Using Python, solve the following problem: There is a key pad that has

 using python, please show how you import the text file. Thank

using python, please show how you import the text file. Thank you. Using Python, solve the following problem: There is a key pad that has a code to enter the bathroom of a company, the keypad is like this: Each day a new set of instructions will be emailed to everyone in the office. Each line of instructions corresponds to one button press. Always start at the number 5. Each button to be pressed can be found by starting on the last button pressed and moving to the adjacent buttons on the keypad: U moves up; D moves down; L moves left; and, R moves right. For example, if your instructions are: UUUUULLLLL DRRRRDDDD LDDDDDDDD UURRRRRRR you start at 5 and move up to 2. Since you can't go up any further on the keypad you stop at 2. Now, move left to 1. Again, since you can't go left any further on the keypad, you stop at 1. So, your first button is 1. Starting at the last button pressed, you now move down one button to 4 then right two times to 6 and down once to 9. So, you now end up at 9, your second number. Continuing on from 9, you move left one and down one to 0. Your third number is O. Finally, from O you move up two to 5 and right one to 6. Your last number is 6, So, given the above instructions, the code for the bathroom key-lock is 1906

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!