1)使用GUI
1、GUI:Graphical user interface
2、tkinter:GUI libary for Python自带的库
3、GUI:Example
2)Ubuntu18.04和Pycharm使用tkinter
如果出现No module named _tkinter
导入依赖sudo apt install python3-tk
3)使用tkinter
from tkinter import *
import tkinter.simpledialog as ts
import tkinter.messagebox as tb
root = Tk()
w = Label(root,text ="lable title")
w.pack()
ts.showinfo("Welcome","welcome Massage")
guess = tb.askinteger("Number","enter a number")
output = "This is output message"
tb.showinfo("output",output)