a = input("请输入一个数字:")
if a > 10:
print("输入的数字大于 10")
else:
print("输入的数字小于等于 10")
a = int(input("请输入一个数字:"))
if a > 10:
print("输入的数字大于 10")
else:
print("输入的数字小于等于 10")
输入的是字符串,不是数字,需要强转
input默认接收到的输入是字符串,需要转为int类型的才能比较:
a = int(a)
if a>10:
a = int(input("请输入一个数字:"))
if a > 10:
print("输入的数字大于10")
elif a == 10:
print("输入的就是10")
else:
print("输入的数字小于10")
Clustering analysis is the task of grouping a set of objects such that objects in the same group are more similar to each other than to those in other groups.
聚类分析是将数据集分组,使得同一组内的数据相比与其他组的数据更相似。