我希望能够插入一行代码,对输出为“ watch”的次数进行计数。
i = 0 [...stuff...] i += 1 print(f"Watch {i}")
尝试这个:
counter = 0 while Amzn > 1000: counter+=1 print("Watch") Amzn = Amzn - (Amzn*.0103) else: print("buy") print(counter)