-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
30 lines (20 loc) · 831 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from tkinter import *
# https://www.youtube.com/watch?v=yQSEXcf6s2I&list=PL_qj1UvvHaM2WD9ogveK0EEXZ86snJJX_&index=32&ab_channel=Codemy.com
root = Tk()
# creating a label widget
myLabel = Label(root, text="Hello World!")
myLabel1 = Label(root, text="Good grief Charlie Brown!")
# "Shoving" it onto the screen
# myLabel.pack()
myLabel.grid(row=0, column=0)
myLabel1.grid(row=1, column=1)
# mainloop() tells Python to run the Tkinter event loop.
# This method listens for events, such as button clicks or keypresses,
# and blocks any code that comes after it from running until you close the window where you called the method.
root.mainloop()
def print_hi(name):
print(f'Hi, {name}')
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')
print("Hello World.")