2017-05-07 65 views
-7

我试图让用户输入一个单词的答案,然后,他们输入的答案将在新问题中打印。 这是我的代码:Python问题与“输入”

device= input ("what device do you have?") 

if (device== "phone"): 

    print(" ") 

elif (device== "samsung"): 

    pass 

Power = input ("what 'power' make do you have?") 
+8

你的问题是什么? – kennytm

+0

2017怎么样?与这个问题有什么关系? –

+1

'Power = input(“what”+ device +“make you do have?”)'这是你在问什么? –

回答

0

你的意思是这样的吗?

answer1 = input("what device do you have? ") 
answer2 = input("looks like you are using '{0}' as a device, but why? ".format(answer1)) 

print(answer2)