try 里面写的是不断获取输入的数值 一旦输入结束,相当于不再满足循环的条件,则跳出该循环,开始打印输出

```arr1 = []
  arr2 = []
  while True:
      try:
          n = int(input())
          if n > 0:
              arr1.append(n)
          else:
              arr2.append(n)
      except:
          print(len(arr2))
          if len(arr1) == 0:
              print('%.1f'%len(arr1))
          else:
              print('%.1f'%(sum(arr1)/len(arr1)))
          break