-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
65 lines (65 loc) · 2.44 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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")