选项不会打印

时间:2012-07-30 22:53:23

标签: python printing if-statement

while True:

    x = raw_input()
    if x =="personal information": 
         print' Edward , Height: 5,10 , EYES: brown , STATE: IL TOWN:  , SS:'
    elif x =="journal":
       print'would you like  you open a journal or create a new one? open or create'
if x =='createfile':
           name_of_file = raw_input("What is the name of the file: ")
           completeName = "C:\\python\\" + name_of_file + ".txt"
           file1 = open(completeName , "w")
           toFile = raw_input("Write what you want into the field")
           file1.write(toFile)
           file1.close()
elif x =='openfile':
       print'what file would you like to open'
       y = raw_input()
       read = open(y , 'r')
       name = read.readline()
       print (name)

选项不打印除个人信息外没有输出。我重新粘贴了代码

0 个答案:

没有答案