current_price = int(input())
last_months_price = int(input())
print("This house is $" + str(current_price), '.', "The change is $" +
str(current_price - last_months_price) + " since last month.")
print("The estimated monthly mortgage is ${:.2f}".format((current_price * 0.051) / 12), '.')
这会产生:
This house is $200000 . The change is $-10000 since last month.
The estimated monthly mortgage is $850.00 .
"$200000"我不确定如何删除and之后的空白"$850.00"。我不完全理解这个strip()命令,但从我读到的内容来看,它对这个问题没有帮助。
ABOUTYOU
手掌心
斯蒂芬大帝
相关分类