我想在while循环中使用一个点

时间:2020-03-27 22:39:34

标签: loops variables

while ((insert)!=(".")):
round=round+1
insert=input("Your ",round,". word please: \n")

我希望只要变量“插入”不是点,循环就可以运行。

1 个答案:

答案 0 :(得分:0)

好像您正在尝试错误地使用文本提示。试试这个代码。

round =1
insert=input(f"Your {round}. word please: \n")
while ((insert)!=(".")):
    round=round+1
    insert=input(f"Your {round}. word please: \n")
相关问题