Skip to content

Commit a72adea

Browse files
Added comments.
1 parent ded28ac commit a72adea

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.vscode/launch.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
"request": "launch",
4040
"program": "emoticon.py",
4141
"console": "integratedTerminal"
42+
},
43+
{
44+
"name": "Select file",
45+
"type": "python",
46+
"request": "launch",
47+
"program": "${file}",
48+
"console": "integratedTerminal"
4249
}
43-
]
50+
]
4451
}

emoticon.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
#
1616
emoticons = [
1717
';)', # 00111011 00101001
18-
'8)' # 00111000 00101001
18+
'8)' # 00111000 00101001
19+
# ^^----- all bits are the same, except for these two.
1920
]
2021

2122
def decode_binary_string(s):
@@ -71,7 +72,7 @@ def main():
7172
# Decode the bits into ASCII characters (8 bits [1 byte] per character).
7273
result = decode_binary_string(key)
7374
results += result
74-
75+
7576
# Print the output, random result of emoticon1 or emotion2!
7677
if i > 0 and i % 80 == 0:
7778
print(''.join(results))

0 commit comments

Comments
 (0)