Python程序错误

时间:2013-10-21 02:37:35

标签: python

我是编程新手,我尝试制作一个python程序。这是:

import time
gravity = 0
space = 0

print "Welcome to the 'Find out who is in space' program"

person_messy = raw_input("Enter a name:")

person = person_messy.lower()

if len(person) < 5:
    print "Make sure you put the first AND last name"
else:
    space = 1
    print "Searching database....."

if person == "oleg kotov" or "mike hopkins" or "sergey ryazanskiy" or "fyodor yurchikhin" or "karen nyberg" or "luca permitano":
    gravity = 1
else:
    gravity = 0

time.sleep(1)

if space == 1:
    print "loading..."

time.sleep(1)

if space == 1:
    print "loading..."

time.sleep(1)

if space == 1:
    print  "loading..."

if gravity == 1:
    print person + "is in space!"
else:
    print "You and " + person + "are on the same planet."

这是我得到的错误:

  

内部错误:ReferenceError:未定义_select

1 个答案:

答案 0 :(得分:0)

我在类似的代码上遇到了同样的问题...你不能使用time.sleep或它给出了这个。我不知道为什么,但这修复了我的代码(不使用time.sleep)