print(2020)
print("CVP Completer")
print("Version 1")
Accounting = True
while Accounting:
    print("")
    print("There are a total of six options")
    print(" ")
    print("1. Total Revenue")
    print("2. Total Cost")
    print("3. Breakeven")
    print("4. Contribution Margin (4) (4a)")
    print("5. Target profit b4 taxes")
    print("6. Target profits after taxes")
    print(" ")
    option = input("Pick a option: ")
    if option == '1':
        print("Total Revenue- selling price multiplied by units sold.")
        a = float(input("enter SP: $"))
        b = float(input("enter Q: $"))
        print("Total Revenue : $" + str(float(a * b)))
    elif option == '2':
        print("Total Cost- variable cost multiplied by units produced plus fixed costs")
        c = float(input("enter VC: $"))
        d = float(input("enter Q: $"))
        e = float(input("enter FC: $"))
        print("Total Cost : $" + str(float(c * d + e)))
    elif option == '3':
        print("Breakeven- total revenue equals total costs, profit equals zero.")
        f = float(input("enter SP: $"))
        g = float(input("enter Q(units sold): $"))
        h = float(input("enter VC: $"))
        i = float(input("enter FC: $"))
        print("Breakeven : $" + str(float((f * g) - (h * g) - i)))
    elif option == '4':
        print("Contribution Margin (4)- selling price minus variable cost.")
        j = float(input("enter SP: $"))
        k = float(input("enter VC: $"))
        print("Contribution Margin : $" + str(float(j - k)))
    elif option == '4a':
        print("Contribution Margin (4a)- breakeven = CM*Q-FC=0")
        l = float(input("enter CM: $"))
        m = float(input("enter Q: $"))
        n = float(input("enter FC: $"))
        print("Contribution Margin Breakeven : $" + str(float(l * m - n)))
    elif option == '5':
        print("Target Profit b4 taxes")
        o = float(input("enter CM: $"))
        p = float(input("enter Q: $"))
        q = float(input("enter FC: $"))
        print("b4 taxes profit : $" + str(float(o * p - q)))
    elif option == '6':
        print("Target Profit after taxes.")
        r = float(input("enter CM: $"))
        s = float(input("enter Q: $"))
        t = float(input("enter FC: $"))
        print(" : $" + str(float(r * s -t)))
        u = float(input("tax rate : %"))
        print(str(float((r * s -t) / (1 - u))))
        print("")
        print("")
    cont = input("Go Again ? : ")
    if cont == 'no':
      break
print("exiting")
