[英]Python: How do you get a programme to prompt the user a certian fixed amount of times for a user input?
[英]How do you get a user input in python in vscode?
我需要導入一些東西嗎? 我嘗試使用“raw_input”,然后在括號中用戶將回答的問題,但是當我運行我的程序時,vscode 說 raw_input 沒有定義。 raw_input 雖然不是變量。 對於上下文,我正在編寫一個迷你項目,您可以在其中玩二十一點(紙牌游戲)
你可以使用 input()
例子:
name = input("What is your name?\n")
print("The user name is " + name)
另外,您的問題已經在這里得到解答
希望能幫助到你
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.