Python Forum
Why is the program not running? Is there a logical or syntax problem?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is the program not running? Is there a logical or syntax problem?
#6
Use the Python button in the editor to wrap your code in Python tags.

You still have an error in root().

And you have a new indentation error:
        self.res_label.config(text=result)
        # create the main window and profit object
        # create the main window and profit object
        root = tk.Tk()
        pro = Profit(root)
        root.mainloop()
As currently written, you are making root inside the calculate() method.

And this indentation is also wrong, though it probably doesn't stop your code running.
    def rule(master):
          return 72/master
The rest of your code uses 4 space indents. This has 8 spaces. Be consistent.
Reply


Messages In This Thread
not run yet? - by behi00 - Mar-31-2023, 10:16 PM
RE: PROGRAM MAP - by behi00 - Mar-31-2023, 10:29 PM
RE: Why is the program not running? Is there a logical or syntax problem? - by deanhystad - Mar-31-2023, 10:28 PM
RE: PROGRAM MAP - by behi00 - Mar-31-2023, 10:59 PM
RE: PROGRAM MAP - by behi00 - Mar-31-2023, 11:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] logical error - saving file rwahdan 4 2,218 Jul-01-2021, 12:59 PM
Last Post: rwahdan
  Running cli program within a wx window? t4keheart 2 2,809 Jan-23-2020, 04:50 PM
Last Post: buran
  tkinter GUI, problem running seperate files fishglue 17 6,595 Oct-15-2019, 02:56 PM
Last Post: Denni
  Interacting with python console while program is running Murmele 2 3,384 Feb-10-2018, 05:43 PM
Last Post: kmcollins

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020