Question: provide the code in python Typing Distance Imagine your computer has a keyboard layout like the one displayed below. Assuming a keyboard typing robot (
provide the code in python
Typing Distance
Imagine your computer has a keyboard layout like the one displayed below.
Assuming a keyboard typing robot for example, something
Pressing any key on the keyboard generates the corresponding upper case letters.
Given a string with only uppercase letters return the total distance traveled by the robot.
The robot can move only left, right, top, and bottom. It can't move diagonally.
Note: There will be no spaces Included in the input provided.
Eximple
word QZ
Output
The robot starts at Q
From Q to W step
From W to S: step
From S to Z: step
Typing Distance
Imagine your computer has a keyboard layout like the one displayed below.
Assuming a keyboard typing robot for example, something
Pressing any key on the keyboard generates the corresponding upper case letters.
Given a string with only uppercase letters return the total distance traveled by the robot.
The robot can move only left, right, top, and bottom. It can't move diagonally.
Note: There will be no spaces Included in the input provided.
Eximple
word QZ
Output
The robot starts at Q
From Q to W step
From W to S: step
From S to Z: step
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
