Question: Word to Bitstring to Boolean List Create a function that converts a word to a bitstring and then to a boolean list based on the

 Word to Bitstring to Boolean List Create a function that converts

Word to Bitstring to Boolean List Create a function that converts a word to a bitstring and then to a boolean list based on the following criteria: 1. Locate the position of the letter in the English alphabet (from 1 to 26). 2. Odd positions will be represented as 1 and even positions will be represented as o 3. Convert the represented positions to boolean values, 1 for True and o for False. 4. Store the conversions into an array. Examples to boolean list ("dep") + [False, True, True, False] # deep converts to 0110 # d is the 4th alphabet - 0 # e is the 5th alphabet - 1 #e is the 5th alphabet - 1 # p is the 16th alphabet - 0 to_boolean_list("loves") + [False, True, False, True, True] to boolean list ("tesh") [False, True, True, False] Notes The letter A is at position 1 and 2 at 26. All input strings are in lowercase letters of the English alphabet

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!