方法如下图所示,
请认真查看,
祝学习愉快:
count=0while True:⚪n=float(input())⚪if n <= 0:⚪⚪print(f"一个有{count}个")⚪⚪break⚪else:⚪⚪count+=1