word='big god'
print ("Who do you think I am?")
answer=input()
if answer==word:
print("Oh, yes. You are right, man!")
if answer=='bad guy':
print('No!I cannot agree with you!')
跑出来的结果就是:
==================== RESTART: C:\Users\文博\Desktop\Test.py ====================
Who do you think I am?
big god
Oh, yes. You are right, man!
others
Traceback (most recent call last):
File "C:\Users\文博\Desktop\Test.py", line 14, in <module>
thisIsLove = eval(input())
File "<string>", line 1, in <module>
NameError: name 'others' is not defined
>>>
==================== RESTART: C:\Users\文博\Desktop\Test.py ====================
Who do you think I am?
bad guy
No!I cannot agree with you!作者: crossin先生 时间: 2018-2-4 09:10
一个代码保存一个文件。你全写在一个里面当然不行了……