-
Notifications
You must be signed in to change notification settings - Fork 0
/
SIFinder.py
105 lines (92 loc) · 2.16 KB
/
SIFinder.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
king_1= """
A Simple Interest Chapter Solver
si >> To find Simple Interest
am >> To find Amount
p >> To find Principal
r >> To find rate
"""
print(king_1)
bh1=True
while bh1==True:
try:
m_e=input("Enter a Method\n")
#To Find Interest
if m_e=="si":
try:
a_1=int(input("Enter Principal\n"))
a_2=int(input("Enter Time Numerator\n"))
p_5=int(input("Enter Time Denominator\n"))
p_r=(a_2/p_5)
a_3=int(input("Enter Rate\n"))
p_g=(a_1*p_r*a_3)/100
ru_1="₹"
p_gi=str(p_g)
d_1="Interest is "
print(d_1 +p_gi+ str(ru_1))
y_4=input("Enter yes/No to continue\n").lower()
if y_4=="yes":
continue
else:
break
except:
print("Enter only numeric value")
#To find Amount
elif m_e=="am":
try:
a_1=int(input("Enter Principal\n"))
a_2=int(input("Enter Time Numerator\n"))
p_5=int(input("Enter Time Denominator\n"))
p_r=(a_2/p_5)
a_3=int(input("Enter Rate\n"))
p_g=(a_1*p_r*a_3)/100
a_m=(p_g+a_1)
s_8=str(a_m)
r_5="₹"
p_go=str(a_m)
d_2="Amount is "
a_m1=(d_2 +p_go+r_5)
print(a_m1)
y_3=input("Enter yes/No to continue\n").lower()
if y_3=="yes":
continue
else:
break
except:
print("Enter Numeric value")
#To find principal
elif m_e=="p":
try:
a_1=int(input("Enter Interest\n"))
a_2=int(input("Enter Time Numerator \n"))
p_5=int(input("Enter Time denominator \n"))
p_r=(a_2/p_5)
a_3=int(input("Enter Rate\n"))
p_g5=(100*a_1)/(a_3*p_r)
fl=int(p_g5)
ru_1="₹"
p_gi=str(p_g5)
print(p_gi+str(ru_1))
y_2=input("Enter yes/No to continue\n").lower()
if y_2=="yes":
continue
else:
break
except:
print("Enter Numeric value")
#To find Rate
elif m_e=="r":
r_a=float(input("Enter Interest\n"))
r_b=int(input("Enter Principal\n"))
r_c=int(input("Enter Time numerator\n"))
r_d=int(input("Enter Time denominator\n"))
r_dc=(r_c/r_d)
p_r=(100*r_a)/(r_b*r_dc)
print(p_r)
y_1=input("Enter yes/No to continue\n").lower()
#For asking to Continue or Exit
if y_1=="yes":
continue
else:
break
except :
print("Error!")