📜  keep Looping = “a” user Input = “y” while (keep Looping == “y”): print (“Hello world!”) user Input = input(“你想让我继续打印hello world吗?(yn) ”) - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:47.882000             🧑  作者: Mango

代码示例1
keepLooping = “y”
userInput = “y”
while (keepLooping == “y”):
    print (“Hello world!”)
    userInput = input(“Would you like me to keep printing hello world? (y/n)”)