Question: My code is below. It outputs in 3 lines. I need output of the first 2 lines to be on one line and I can't
My code is below. It outputs in 3 lines. I need output of the first 2 lines to be on one line and I can't figure out how to make that happen. Everything I try to put them on one line results in errors.
current_price = int(input())
last_months_price = int(input())
price_dif = current_price - last_months_price
monthly_mort = (current_price * 0.051) / 12
print('This house is ${}'.format(current_price) + '.')
print('The change is ${}'.format(price_dif) + ' ' + 'since last month' + '.')
print('The estimated monthly mortgage is ${:.2f}'.format(monthly_mort) + '.')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
