代碼
count=0while count<=49:print("loop",count)count+=1if count==50:pass
count+=1while count>=51 and count<=59:print("loop",count)count+=1while count>=60 and count<=90:print("loop",count*count)count+=1while count>90 and count<=100:print("loop",count)count+=1
運行結果
運行結果是對的,但是程序有些不簡潔
修改后的代碼為
count=0while count<=100:if count==50:passelif count>=60 and count<=90:print("loop",count*count)else:print("loop",count)count+=1
運行結果
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态