今天遇到一个bug
TypeError: '>=' not supported between instances of 'int' and 'str'
后来了解到 input 输入的是str类型的
要想实现>= 就要换成int 类型
改正:
age = int(input("请输入你的年龄:"))
今天遇到一个bug
TypeError: '>=' not supported between instances of 'int' and 'str'
后来了解到 input 输入的是str类型的
要想实现>= 就要换成int 类型
改正:
age = int(input("请输入你的年龄:"))