TypeError: ‘decimal.Decimal‘ object cannot be interpreted as an integer
这里直接翻译了一下。。。TypeError:'decimal.Decimal'对象不能被解释为一个整数然后把range()函数中用到的num,直接定义为int类型,就好像OK了?这算是解决了这个问题了吗?反正运行起来是没报错了,也不知道对不对,笑哭。print("——拼手气红包——")fromdecimalimport*importrandomtotal=input("请输入红包总金额:")num