请教程序哪里出现问题?
用if做条件测试,但是后面却显示不出结果,请教是哪里出现问题?这是我第一次尝试输入的代码:
>>> age = 19
>>> if age >= 18:
... print("You are old enough to vote!")
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
TypeError: 'str' object is not callable
第二次修改后的结果:
>>> age = 19
>>> if age >= 18:
... print=("You are old enough to vote!")
...
>>>
没有显示出打印结果,然后我把等号=和括号()都去掉,还是没有显示打印结果,求指教
第三次修改的结果:
>>> age = 19
>>> if age >= 18:
... print = "You are old enough to vote!"
...
>>>