Commit fc74754a by BellCodeEditor

auto save

parent d3b0d1a4
Showing with 24 additions and 1 deletions
#tk-button
#python3
from tkinter import *
er = Tk()
er.title("tk-button")
er.geometry('500x400')
def printhello():
t.insert('2.1', "hello\n")
def printpress():
t.insert('1.0', "press\n")
## print(t)
## t.insert('2.0', "hello\n")
t = Text()
print(t)
t.pack()
Button(er, text = 'hello', command = printhello).pack(side = LEFT)
Button(er, text = 'press', command = printpress).pack(side = LEFT)
er.mainloop()
# 期末考试结束了,悟空在教务系统查到了自己的几门必修课分数,他想通过python计算自己的平均分。
# 于是写了下面的代码,可是总是得不到结果,请帮纠正bug并跑通程序。
scores = {'语文':9, '数学':95, '英语':80}
scores = {'语文':91, '数学':95, '英语':80}
def get_average(scores):
score = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment