不了解如何让循环停止并继续/重复 另外,不了解如何使布尔的第二部分工作
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" )
答案 0 :(得分:0)
Nimkora,
你只需要在while循环结束时添加另一个赋值语句,这样,一旦用户输入一个有效的输入,程序就可以打破while循环。
app.post('/signUp', (req, res) => {
res.end("it worked!!");
});