I need help with this function.
def expenses(monthly_budget):
expenses = float(input("What are your actual expenses each month? "))
perc_act_expenses = expenses / monthly_budget
perc_act_expenses = round(perc_act_expenses, 2)
print(f"Your actual expenses are {expenses} and that is {perc_act_expenses * 100}% of your monthly budget.")
rec_expenses = .50 * monthly_budget
rec_expenses = round(rec_expenses, 2)
print(f"Recommended amount spent on expenses each month is ${rec_expenses}\n")
When I put 100000 as the salary and calculate the net income after fed and state tax for FL I get 85000. The monthly budget is 85000/12 = 7083.33
This is what I get as the output: What are your actual expenses each month? 8000 Your actual expenses are 8000.0 and that is 112.99999999999999% of your monthly budget. Recommended amount spent on expenses each month is $3541.66
-It should only round to 2 decimal points and it doesn't -I'm expecting an output of 112.94
What am I doing wrong?