Question: Output: Help me with the codes pls. Not too advanced ones. We havent learned masks and yields yet. Just basic programming please like while loops,

Output:

Help me with the codes pls. Not too advanced ones. We havent learned masks and yields yet. Just basic programming please like while loops, append, list, if statements. thank you
generatePad (seed, k, 1) o returns a pseudo-random list of 1s and Os, generated by an [N, k] LFSR, where N = length of seed o parameters: seed : list of 1's and O's .k: int , tap position . 1: int , length of the sequence to be generated o return type: list of 1's and O's encrypt (message, seed, k) o takes a string message and returns it as an encrypted string using an [N, k] LFSR o parameters: message : string of characters from Base64 set seed : list of 1's and O's k: int, tap position o return type: string 5. Testing generatePad(), with: >seed (1,0,0,0,1,1,0,0,1,0] >k = 8 >length = 20 Expected: 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 Actual: 10 111110000 1000 11001 6. Testing encrypt() Input: WhenSeagullsFollowTheTrawlerItIsBecause TheyThinkSardinesWillBeThrown Into The Sea Expected: 5AYyuWoPPjwQNakEulvps8KcLZWZnM059Wu1PqLvpsdyn3bsg1Kb3be5Djw9WhoKulbAVCJVOias1 Actual: SAYyuWoPPjWQNakEulvps8Kc LZWZnM059Wu1PqLvpsdyn3bsg1kb3bWe5Djw9WhoKulbAVCJVDias1 Decrypted: WhenSeagullsFollowTheTrawlerItIsBecause TheyThinkSardinesWillBeThrown IntoTheSea generatePad (seed, k, 1) o returns a pseudo-random list of 1s and Os, generated by an [N, k] LFSR, where N = length of seed o parameters: seed : list of 1's and O's .k: int , tap position . 1: int , length of the sequence to be generated o return type: list of 1's and O's encrypt (message, seed, k) o takes a string message and returns it as an encrypted string using an [N, k] LFSR o parameters: message : string of characters from Base64 set seed : list of 1's and O's k: int, tap position o return type: string 5. Testing generatePad(), with: >seed (1,0,0,0,1,1,0,0,1,0] >k = 8 >length = 20 Expected: 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 Actual: 10 111110000 1000 11001 6. Testing encrypt() Input: WhenSeagullsFollowTheTrawlerItIsBecause TheyThinkSardinesWillBeThrown Into The Sea Expected: 5AYyuWoPPjwQNakEulvps8KcLZWZnM059Wu1PqLvpsdyn3bsg1Kb3be5Djw9WhoKulbAVCJVOias1 Actual: SAYyuWoPPjWQNakEulvps8Kc LZWZnM059Wu1PqLvpsdyn3bsg1kb3bWe5Djw9WhoKulbAVCJVDias1 Decrypted: WhenSeagullsFollowTheTrawlerItIsBecause TheyThinkSardinesWillBeThrown IntoTheSea
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
