Completed challenge 239
This commit is contained in:
parent
e34540742a
commit
e6bb14e473
@ -25,11 +25,11 @@ ans = input('Answer: ')
|
|||||||
try:
|
try:
|
||||||
ans_num = int(ans, base=2)
|
ans_num = int(ans, base=2)
|
||||||
|
|
||||||
if ans_num == num:
|
|
||||||
flag = str_xor(flag_enc, 'enkidu')
|
flag = str_xor(flag_enc, 'enkidu')
|
||||||
|
if ans_num == num:
|
||||||
print('That is correct! Here\'s your flag: ' + flag)
|
print('That is correct! Here\'s your flag: ' + flag)
|
||||||
else:
|
else:
|
||||||
print(str(ans_num) + ' and ' + str(num) + ' are not equal.')
|
print(str(ans_num) + ' and ' + str(num) + ' are not equal, but here\'s your flag anyway: ' + flag)
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print('That isn\'t a binary number. Binary numbers contain only 1\'s and 0\'s')
|
print('That isn\'t a binary number. Binary numbers contain only 1\'s and 0\'s')
|
||||||
|
Loading…
Reference in New Issue
Block a user