Skip to content

angelamarkos/Binary-string-encoder-and-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Binary-string-encoder-and-decoder

Implement a python module, which will contain two functions: encode and decode.

  • "encode" function must take plain string as an argument and return binary representaion of the string,
  • "decode" function must take binary representaion of a string as an argument and return decoded string,
  • input for the decode and output of encode function must contain only '0's and '1's,
  • assume each character of the plain text to have a length of 1 byte,
  • the plain string may contain latin letters, numbers, space and other characters,
  • OPTIONAL: both functions can be written with one line of code.

Sample string for decoding (formatted for view):

01010010011101010110110001100101011100110010000001101111
01100110001000000100111101110000011101000110100101101101
01101001011110100110000101110100011010010110111101101110
00111010001000000101001001110101011011000110010100100000
00110001001110100010000001000100011011110110111000100111
01110100001000000110010001101111001000000110100101110100
00101110001000000101001001110101011011000110010100100000
00110010001000000010100001100110011011110111001000100000
01100101011110000111000001100101011100100111010001110011
00100000011011110110111001101100011110010010100100111010
00100000010001000110111101101110001001110111010000100000
01100100011011110010000001101001011101000010000001111001
01100101011101000010111000100000001011010010000001001101
01101001011000110110100001100001011001010110110000100000
01000001001011100010000001001010011000010110001101101011
011100110110111101101110

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published