我正在尝试创建一个程序来创建问题,最终返回用户输入的信息。这是我的代码:
. 默认问卷:
>>. 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,但这使程序卡住(无法输入)所以我把它们拿出来