<commit_before>#personal finance calculator developed by managerclaire
def DINKcalculator():
    name_a = input("First spouse's name: ")
    name_b = input("Second spouse's name: ")
    #print(name_a + " and " + name_b + " are evaluating job offers. ")
    income_a = ene(name_a)
    income_b = ene(name_b)
    combined_income = income_a + income_b
    print("Gross monthly income: " + '${:,.2f}'.format(combined_income))
    tax = taxes(combined_income)
    monthly_taxes = tax / 12
    print("Approximate monthly taxes: " + '${:,.2f}'.format(monthly_taxes))
    total_expenses = expenses()
    savings = combined_income - total_expenses - monthly_taxes
    print("Approximate monthly savings: " + '${:,.2f}'.format(savings))
    final_savings = retirement(savings)
    print("Retirement balance: " + '${:,.2f}'.format(final_savings))

#pulls name_a or name_b from DINKcalculator()
def ene(name_var):
    ene = int(input("Enter 1 if " + name_var + " is paid an hourly wage or 2 if " + name_var + " is paid a salary: "))
    if ene == 1:
        income = wage(name_var)
        return income
    elif ene == 2:
        income = salary(name_var)
        return income
    #error
    else:
        print("I'm sorry, I did not recognize that input. Please start over.")
        return

#pulls name_a or name_b from DINKcalculator()
def wage(name_var):
    hours = float(input("How many hours does " + name_var + " work per week? "))
    wage_var = float(input("How much does " + name_var + " make per hour? "))
    weekly = hours*wage_var
    monthly = weekly*4
    print(name_var + " makes " + '${:,.2f}'.format(weekly) + " per week and approximately " + '${:,.2f}'.format(monthly) + " per month.")
    return monthly

#pulls name_a or name_b from DINKcalculator()
def salary(name_var):
    yearly = float(input("What is " + name_var + "'s annual salary? "))
    monthly = yearly / 12
    print(name_var + " makes " + '${:,.2f}'.format(monthly) + " per month.")
    return monthly

#pulls combined_income from DINKcalculator()
def taxes(income):
    annual_income = income*12
    tax_income = annual_income - 12700 - 4050*2<commit_msg>Added while loop for validation<commit_after>#personal finance calculator developed by managerclaire
def DINKcalculator():
    name_a = input("First spouse's name: ")
    name_b = input("Second spouse's name: ")
    #print(name_a + " and " + name_b + " are evaluating job offers. ")
    income_a = ene(name_a)
    income_b = ene(name_b)
    combined_income = income_a + income_b
    print("Gross monthly income: " + '${:,.2f}'.format(combined_income))
    tax = taxes(combined_income)
    monthly_taxes = tax / 12
    print("Approximate monthly taxes: " + '${:,.2f}'.format(monthly_taxes))
    total_expenses = expenses()
    savings = combined_income - total_expenses - monthly_taxes
    print("Approximate monthly savings: " + '${:,.2f}'.format(savings))
    final_savings = retirement(savings)
    print("Retirement balance: " + '${:,.2f}'.format(final_savings))

#pulls name_a or name_b from DINKcalculator()
def ene(name_var):
    valid = False
    while valid == False:
        ene = int(input("Enter 1 if " + name_var + " is paid an hourly wage or 2 if " + name_var + " is paid a salary: "))
        if ene == 1:
            income = wage(name_var)
            valid = True
        elif ene == 2:
            income = salary(name_var)
            valid = True
        #error
        else:
            print("I'm sorry, I did not recognize that input. Please start over.")
    return income    

#pulls name_a or name_b from DINKcalculator()
def wage(name_var):
    hours = float(input("How many hours does " + name_var + " work per week? "))
    wage_var = float(input("How much does " + name_var + " make per hour? "))
    weekly = hours*wage_var
    monthly = weekly*4
    print(name_var + " makes " + '${:,.2f}'.format(weekly) + " per week and approximately " + '${:,.2f}'.format(monthly) + " per month.")
    return monthly

#pulls name_a or name_b from DINKcalculator()
def salary(name_var):
    yearly = float(input("What is " + name_var + "'s annual salary? "))
    monthly = yearly / 12
    print(name_var + " makes " + '${:,.2f}'.format(monthly) + " per month.")
    return monthly

#pulls combined_income from DINKcalculator()
def taxes(income):
    annual_income = income*12
    tax_income = annual_income - 12700 - 4050*2
{'fraction_non_alphanumeric': 0.1340041161673908, 'fraction_numerical': 0.012805854104733592, 'mean_word_length': 3.275659824046921, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6676862', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1442, 'n_words': 389}