#pyinstaller -i xxxx.ico -w -F xxxx.py
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as msg
#定义函数
def is_real(num):
try:
float(num)
except:
return 0
else:
return 1
def sci(HT=10.0A=20.0):
b = 0.0423
c = 5.5929
Ai = 40.0
sci = HT*(1+c*pow(2.7183-b*A))/(1+c*pow(2.7183-b*Ai))
return sci
def run(event):
md_10 = [1710158016001480153013901220960]
md_12 = [12101120113010501090990860680]
md_16 = [850780790730760690600470]
md_20 = [630580590550570520450360]
md_24 = [560520520490500460400310]
result_ht = is_real(HT_entry.get())
result_dg = is_real(Dg_entry.get())
result_age = is_real(Age_entry.get())
if result_ht and result_dg and result_age:
my_sci = sci(float(HT_entry.get())float(Age_entry.get()))
SCI.set(my_sci)
if my_sci < 10.0 and float(Dg_entry.get()) < 10.5:
Min.s
评论
共有 条评论