1

我是编程新手,我试图制作一个 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 未定义

4

1 回答 1

0

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

于 2015-02-13T17:41:13.327 回答