帮小朋友写的第一个程序

numbers=[]
while True:

num=input('Enter a number:')
if num=='done':
break
elif num.isnumeric():
numbers.append(int(num))

else:
print('invalid input')

print(numbers)

import numpy as np

list=np.array(numbers)
print(list)
print(list.max())

posted @ 2020-07-04 07:15  MINGZHUQI  阅读(102)  评论(0编辑  收藏  举报