0
不理解如何让循环停止和继续/重复 也,不明白如何让布尔的第二部分工作while循环和布尔
monthly_investment = float(input("Enter monthly investment:\t"))
while monthly_investment < 1:
print("Entry must be greater than 0")
yearly_interest_rate = float(input("Enter yearly interest rate:\t"))
while yearly_interest_rate < 1 and yearly_interest_rate < 16:
print("Entry must be greater than 0 and less than or equal to 15")
https://www.tutorialspoint.com/python/python_while_loop.htm –
我理解的循环只是没怎么回去,如果该值是Ø – Nimkora
回去的地方?如果您想根据条件进行操作,请使用if语句 –