1.对Python基本语法的简单运用,小小的文字游戏
import time
print "Welcome to the space"
password = raw_input("Please input your password: \n")
while password != "123456":
print "The password is worng , please input it again"
password = raw_input("Please input your password: \n")
print " "
print "Welcome to the ship , you have a lot of choices\n"
print "a-fire cannon"
print "b-break the ship"
print "c-exit"
print " "
time.sleep(1)
conductor = raw_input("please input your conductor\n")
while conductor != "c":
if conductor == "a":
T1 = raw_input( "Are you sure? (y/n)\n")
if T1 == "y":
print "fire!"
time.sleep(1)