Py学习  »  Python

如果条件为假python,如何返回第1行

Asim Khan • 6 年前 • 1565 次点击  

如果条件为假,我如何才能回到第一行。

while True:
    food = int(input("food bill: "))
    if food <= 10:
        print("please write more than 10")
#If i put break statement here it does not go forward
    else:
        carbill = int(input("carbill: "))
    print("Total Montlhy expenditure is : " , grandtotal)
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/39065
 
1565 次点击  
文章 [ 2 ]  |  最新文章 6 年前