[英]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.