2016-09-17 43 views
-1

我已經安裝了python 3.5.2,但是當我嘗試從用戶獲取值時,它不起作用,它只顯示消息但從來沒有從用戶那裏獲得價值如何解決這個問題? ?Python 3.5.2變量錯誤

enter image description here

+4

您應該使用'input'不'print' –

回答

0

像@Moses說,你必須使用input()功能:

>>> d = input('Enter the num here: ') 
Enter the num here: 222 
>>> d 
'222' 
>>> int(d) 
222 
+0

如果此解決方案是正確的,你能接受請回答? –