avatar Bite 347. Which words can you type with one hand?

In this Bite you will write a function that takes a word and determines if it can be written with only the left or right hand, or if both hands are needed.

We will assume a keyboard with a QWERTY layout and you only have to look at the A-Z chars which we have conveniently mapped to left and right hand chars as per:

(Source: Computer Hope)

So use LEFT_HAND_CHARS and RIGHT_HAND_CHARS in the function. As the return type can only hold three possible values (left, right, both), we created an Enum called Hand which you should use in the return.

Have fun and keep calm and code in Python!

 

Login and get coding
go back Beginner level
Bitecoin 2X

62 out of 64 users completed this Bite.
Will you be the 63rd person to crack this Bite?
Resolution time: ~23 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 1.0 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help