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語句 –