我试图创建一个程序来创建一个questionaiire,最终返回信息的用户输入。这里是我的代码:Python:改变raw_input?
。防守questionaiire:
>>. Loop = 0
>>
>> While loop != 1:
>> Print "A: name"
>> Print "B: age"
>> Print "B: Favorite color".
>> Zen = raw_input("choose a, b, or c") #my problem line
>> If zen == "a" or "A":
>> A = raw_input("Input your name: ")
>>. Elif zen == "b" or "B":
>>. B = raw_input:("Input your age: ")
>>. Elif zen == "C" or "c":
>> C = raw_input("Input your favorite color")
>> Else:
>> Print A, B, C
>> Break
的结束位是有点更复杂,但本质上这就是我的职责。帮帮我? 我也试过在if和elifs之后插入return,但是这让程序卡住了(couldnt input),所以我将它们取出了
请按照您在脚本中的方式完全格式化代码。否则,如果有人想帮助你,首先需要为你解决它。 – Tadeck 2012-08-06 08:23:08