我是一个编程初学者,我需要一些帮助,我需要把这个python(3.5.3)代码放到GUI中。我已经读了很多的tkinter教程,但是没有一个对我有帮助。 我需要所有的输入和打印出现在屏幕上。 代码如下:
entrada_salario = float(input("Qual o seu salário mensal? "))
entrada_horas = int(input("Quantas horas você trabalha por dia?"))
entrada_dias = int(input("Quantos dias por semana você trabalha?"))
horas_trabalhadas = ( entrada_horas * entrada_dias ) * 4
valor_hora = entrada_salario / horas_trabalhadas
custo_cem = 100 / valor_hora
print("Você trabalha" , horas_trabalhadas, "h por mês, recebe R$" , valor_hora,"por hora e seu custo 100 é de %.2f" %custo_cem)
好吧,从我所看到的,你只是不了解tkinter或任何GUI的基本知识。也就是说,你真的应该从教程中构建一些程序,这样你就可以掌握GUI
你想做的是非常简单,即使是最基本的tkinter。你知道吗
下面是如何用一个简单的GUI来实现这一点。你知道吗
相关问题 更多 >
编程相关推荐