野猫谈Python的博客n=1 while n s=s+n n=n+1 print(s) 或者用for-else语句配合使用 s=0 for i in range(1,101): s=s+i else: print(s) 更多源码、Python知识手册+薇欣:Python9955 无套路直接发 5.打印下列图形 * ** *** **** ***** ...
亲爱的老少女的博客趣味代码一:爱心 代码段: import time words = input('Please input the words you want to say!:') for item in words.split(): print('\n'.join([''.join([(item[(x-y) % len(item)] if ((x*0.05)**2+(y*...