Goals: what we will make by the end of the day

Untitled

History of GUI and Introduction to Tkinter

Creating Windows and Labels with Tkinter

TKinter documentation:

**http://tcl.tk/man/tcl8.6/TkCmd/pack.htm**

https://docs.python.org/3/library/tkinter.html

import tkinter
window = tkinter.Tk()
window.title("My First GUI program")
window.minsize(width=500, height=300)

#Label
my_label = tkinter.Label(text="I am a Label", font=("Airal", 24, "bold"))
my_label.pack()

window.mainloop()

Setting Default Values for Optional Arguments inside a Function Header

def my_function(a='a',b='b',c='c'):
    #Do this with a
    #Then do this with b
    #Finally do this with c

# Optional argument : 傳入的引數值前有加上參數名稱,所以函式會依引數名稱來取用值,傳入順序不影響結果。   
my_function(a='a',b='b',c='c')

Untitled

Default Values Quiz