标识符中的无效字符

时间:2019-05-24 01:31:25

标签: python

标识符中的无效字符。我不知道该怎么做我正在制作的转换器。

我尝试注释掉一些代码,但无法正常工作。

这是发生的区域。

 class MetricRobin():
            #568.34 robins in a metric robin
            convertMetric =  input ("What do you want to convert into? ")
            if convertMetric == "pounds":
                count = input ("How many? ")
                count = int (count)
                count = count * 2
                count = count / 568.34
                print (count)
                count = 0
            elif convertMetric == "kilos":
                count = input ("How many? ")
                count = int (count)
                count = count *2.20462262
                count = count *2
                count = count / 568.34
                print (count)
                count = 0

            elif convertMetric == "tons":
                count = input ("How many? ")
                count = int (count)
                count = count * 4000
                count = count / 568.34
                print (count)


                count = 0


只是错误,这很奇怪。

0 个答案:

没有答案