''' for循环 求1到100中有几个偶数 ''' count=0 for x in range(1,100): if x%2==0: count+=1 print("有"+str(count)+"个偶数")