Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 每次都有相同的错误:TypeError:'<';在';str';和';int';_Python_Python 3.x - Fatal编程技术网

Python 每次都有相同的错误:TypeError:'<';在';str';和';int';

Python 每次都有相同的错误:TypeError:'<';在';str';和';int';,python,python-3.x,Python,Python 3.x,我想做一个税务计算器。但是,在此之前,我想测试和设计我未来的税务计算器。 我为它做了一个测试文件 这是我的测试文件: # This is just a test to see how to design the full tax calculator print("The data collected from you to calculate you annual tax, WILL NOT BE STORED in any way.") print("If y

我想做一个税务计算器。但是,在此之前,我想测试和设计我未来的税务计算器。 我为它做了一个测试文件

这是我的测试文件:

# This is just a test to see how to design the full tax calculator

print("The data collected from you to calculate you annual tax, WILL NOT BE STORED in any way.")
print("If you are married please type 'M' in the next line or if you are single please type 'S' or if you are a head of household ")

m = input("Please type 'M' or 'S' or 'HOH' without the quote marks here: ")
if m == 'M':
    salary = input("Now please enter your salary here: ")

    if salary<19751:
        tax1 = salary/range(10.33,11.22)
        print(f"{tax1}")'
#这只是一个测试,看看如何设计完整的税务计算器
打印(“从您处收集的用于计算您的年度税款的数据将不会以任何方式存储。”)
打印(“如果您已婚,请在下一行键入'M',如果您单身,请键入'S',或者如果您是户主”)
m=输入(“请在此处键入不带引号的‘m’或‘S’或‘HOH’:)
如果m==“m”:
工资=输入(“现在请在此处输入您的工资:”)

if salary
input()
返回一个字符串。A
另外,您认为
范围(10.33,11.22)
有什么作用?你可能想读一读关于我忘了这个范围不适用于float抱歉
TypeError:'<' not supported between instances of 'str' and 'int'
salary = int(input("Now please enter your salary here: "))