我正在制作的语法错误是什么?

时间:2015-02-06 02:26:57

标签: python python-3.x syntax-error

noob这里我在Python3中遇到语法错误,我不确定如何纠正它。

File "assign1.py", line 24
    print(chr(code))
        ^
number = ord('C')
number = ord('a') + (number << 8)
number = ord('t') + (number << 8)

print(bin(number))

code = number  >> (6 * 3)
number = number - (code  << (6 * 3))
code = number >> (6 * 2)
number = number - (code  << (6 * 3))
code = number >> (6 * 1)
number = number - (code << (6 * 1)

print(chr(code))

1 个答案:

答案 0 :(得分:1)

你只是在下面的句子中错过了一个关闭的parethensis,又名)

number = number - (code << (6 * 1)