Skip to main content
 首页 » 编程设计

python之类型错误 : unorderable types: str() > int()

2025年05月04日10unruledboy

大家好,我收到错误了

TypeError: unorderable types: str() > int() 

当我运行下面的代码时。我刚开始学python

number = input('Type in a number between 5 and 20 - ') 
# run loop as long as the number is more than 0 
while number > 0: 
    print('Number: ', number) 
    number -= 1 

我该如何解决?