Question: how do you code step 3 and 4 in python 2.7? Thanks Background In this assignment you will implement a library of functions that can
how do you code step 3 and 4 in python 2.7? Thanks
Background In this assignment you will implement a library of functions that can be used to encode and decode a list of lists of integers as binary strings The integers and binary strings will be stored in a list of lists, An example list of list of integers would look like: [[33, 70, 94, 17] 91, 58, 58, 48, 84] 77, 45, 30] Design, implement, and test a program that satisfies the requirements below IMPORTANT!! This assignment will be run through an automated testing program to be graded. Function syntax in your program roust be exactly as specified, including spelling, capitalization, and this order of function parameters, DO NOT include any input or print statements, or a main function Failure to y follow the requirements below will result in a significant loss of marks. Requirements Implement to Binary (a) which takes a list of integers a and returns a new list where each entry in air converted to a binary string using the Python function bin (). Implement to Integer (a) which takes a list of binary a strings and returns a new list where each entry in je converted to an integer value using the Python function int (binary string, 2) (the "2' denotes a base 2 integer). Implement encode (A, n) which takes a list of lists of integer A and an integer n and returns a new list of list a strings where each entry in A has first been multiplied by n, then converted to a binary a string using to Binary. Be careful not to modify A. Implement decode (S, n) which takes a list of lists of binary a strings s and an integer n and returns a new list of lists of integers where each entry in S has first been converted to integer form using to Integer, then divided by n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
