python gui

import tkinter as tk
root = tk.Tk()
root.title("my title")

#	enter widgets here


Here is what the above code is Doing:
1. We’re creating a Tk object, which is the main window.
2. We’re setting the title of the window to “my title”.
3. We’re setting the size of the window to 200×150.
4. We’re setting the background color of the window to black.
5. We’re adding a widget to the window.
6. We’re starting the main loop, which will display the window and allow us to interact with it.

If you run the code, you should see a window with a black background and a white button.

Now let’s add a few more widgets to the window. We’ll add a label, an entry box, and a button. The label will be used to display some text, the entry box will be used to input text, and the button will be used to submit the text.

Add the following code to the end of your file: