【发布时间】:2020-11-02 12:50:44
【问题描述】:
elif opt==2:
nitem=str(input('enter the porduct name'))
nitemc=int(input('enter the item code'))
nstkq=int(input('enter stock qty'))
nitemtyp=str(input('enter item type'))
b={'itemname':nitem,'itemcode':nitemc,'item-type':nitemtyp,'stock':nstkq}
stock=stock.append(b ,ignore_index=True)
x=str(input('do you want to add another one? \n "y" for yes "n" for no' ))
if x=='y':
<to repeat>
我应该使用什么代码让代码在用户要求的时间内重复多次?
希望我能得到帮助谢谢!!!!!!!
【问题讨论】:
-
一个循环怎么样?