Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I don't get this no matter how many times i recode its still the same

import tkinter as tk


class Calculator:
def __init__(self):

    self.window = tk.Tk()
    self.window.geometry("375*667")
    self.window.resizable(0,0)
    self.window.title("Calculator")


def run(self):
    self.window.mainloop()

this the code I have been working

And Here is The Problem I Have been Facing

 File "C:\Users\Home\Desktop\calculator\calc.py", line 5
    def __init__(self):
    ^
IndentationError: expected an indented block after class definition on line 4

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Select all your code from line 5 to 10 and press TAB. Your indentation is wrong, just as your error message says it is.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading