@@ -6,16 +6,16 @@ def clear_all() :
6
6
compound_field .delete (0 , END )
7
7
principle_field .focus_set ()
8
8
9
- def calculate_ci ():
9
+ def calculate_compoundinterest ():
10
10
principle = int (principle_field .get ())
11
11
rate = float (rate_field .get ())
12
12
time = int (time_field .get ())
13
- CI = principle * (pow ((1 + rate / 100 ), time ))
14
- compound_field .insert (10 , CI )
13
+ compoundinterest = principle * (pow ((1 + rate / 100 ), time ))
14
+ compound_field .insert (10 , compoundinterest )
15
15
16
16
if __name__ == "__main__" :
17
17
root = Tk ()
18
- root .geometry ("400x250 " )
18
+ root .geometry ("310x250 " )
19
19
root .title ("Compound Interest Calculator" )
20
20
label1 = Label (root , text = "Principle Value" ,
21
21
fg = 'black' , bg = 'orange' )
@@ -45,7 +45,7 @@ def calculate_ci():
45
45
compound_field .grid (row = 5 , column = 1 , padx = 10 , pady = 10 )
46
46
47
47
button1 = Button (root , text = "Submit" , bg = "orange" ,
48
- fg = "black" , command = calculate_ci )
48
+ fg = "black" , command = calculate_compoundinterest )
49
49
button2 = Button (root , text = "Clear" , bg = "orange" ,
50
50
fg = "black" , command = clear_all )
51
51
0 commit comments