NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
## while用法与if格式是一样的,也是4个空格为缩进 ## 缩进的就属于子程序,嵌套子程序 ![](https://img.kancloud.cn/a1/2a/a12ad0583de096d7121cb4291ce110a1_1433x658.png) ## 99乘法表 ~~~ i = 0 while i < 9: i = i + 1 s=0 print(' ') while s < i: s = s + 1 print("%s*%s=%s\t"%(s,i,s*i),end=' ') ~~~ ![](https://img.kancloud.cn/7a/e2/7ae255efe0a15f86c3e1079bc2d8c921_2616x1880.png)