0

I don't understand what the problem is with my code - it has everything i need and should execute fine.

No error is generated so I believe it is a logic error but I don't know how to fix it per say.

Help with this would be much appreciated.

from tkinter import *
from tkinter import ttk

def Payment_Computation(self):

 
def Getting_Payment_in_Monthly():


def __init__(self):

2 Answers 2

2

You are missing some vital parts of an oop program:

from tkinter import *
from tkinter import ttk

class MainApplication():   # create class

    def __init__(self):
        # method code

    def Payment_Computation(self):
        # method code
     
    def Getting_Payment_in_Monthly(self, Amount_Loan, mon_rate_interest, no_of_yrs):
        # method code

if __name__ == "__main__":
    MainApplication()    # Instantiate class

You need to place the code in a class. You then need to instantiate the class as exemplified above.

Read more about oop program structure in Best way to structure a tkinter application?

Sign up to request clarification or add additional context in comments.

Comments

0

You didn't call the __init__() function. Please check carefully :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.