我有“ typeerror:' float'对象是不可能的。当我也想转换浮标中的第二个数字时
def pl():
num1=float(ent.get())
ent.delete(0, END)
num2=float(ent.get())
result=sum(num1, num2)
ent.insert(END, result)
当我想总结两个数字时,此错误发生。它说我不能将字符串号转换为浮子。
def pl():
num1=float(ent.get())
ent.delete(0, END)
num2=float(ent.get())
result=sum(num1, num2)
ent.insert(END, result)
When I want to sum both of the numbers this error happens. It says I cannot convert string number to the float one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论