jeapedu 15 两重循环习题3
2018-02-27 11:33
274 查看
链接: https://pan.baidu.com/s/1eUar0um 密码: vkqi
# # # # # # # # # i = 1 while i < 10: j = 1 while j < 10: if i < 9: if j == 1 or j == i: print("*", end=' ') else: print(" ", end=' ') else: print("*", end=' ') j += 1 print("") i += 1 # # # # # # # # # i = 1 while i < 10: j = 1 while j < 10: if i < 9: if j == 9 or j + i == 10: print("*", end=' ') else: print(" ", end=' ') else: print("*", end=' ') j += 1 print("") i += 1 # # # # # # # # i = 1 while i <= 10: j = 1 while j < 20: if i < 10: if j + i == 11 or j == 9 + i: print("*", end=' ') else: print(" ", end=' ') else: print("*", end=' ') j += 1 print("") i += 1 # # # # # # # # # i = 1 while i <= 10: j = 1 while j < 20: if j + i >= 11 and j <= 9 + i or i == 10: print("*", end=' ') else: print(" ", end=' ') j += 1 print("") i += 1 i = 0 # 10 row while i < 10: j = 1 # 19 col while j < 20: mid = 19 // 2 + 1 #print(mid) if j == mid - i or j == mid + i or i == 9: print("*", end=' ') else: print(" ", end=' ') j += 1 print("") i += 1 i = 0 # 10 row while i < 10: j = 1 # 19 col while j < 20: mid = 19 // 2 + 1 #print(mid) if j >= mid - i and j <= mid + i or i == 9: print("*", end=' ') else: print(" ", end=' ') j += 1 print("") i += 1 i = 0 # 10 row while i < 10: j = 1 # 19 col while j < 20: #mid = 19 // 2 + 1 #print(mid) if j > i and j <= 19 - i or i == 0: print("*", end=' ') else: print(" ", end=' ') j += 1 print("") i += 1
相关文章推荐
- jeapedu 26 字符串与两重循环习题2答案
- jeapedu 13 两重循环习题1
- java 练习的习题 7_15 循环练习代码
- jeapedu 23 字符串与两重循环
- jeapedu 27 字符串与两重循环习题2图解
- jeapedu 12 两重循环
- jeapedu 14 两重循环习题2
- jeapedu 24 字符串与两重循环习题答案
- jeapedu 25 字符串两重循环习题2
- 循环-21. 求交错序列前N项和(15)
- 15-07-03 语句- for () 循环语句-迭代法
- 循环-12. 打印九九口诀表(15)
- while循环和for循环的比较,习题33,笨方法学python
- PTA 5-15 数组循环左移 (20分)【List】
- ACM习题O-15
- 【在路上】Learn Python The Hard Way 习题心得(ex11,12,13,14,15)
- 笨办法学python加分习题15
- 循环-12. 打印九九口诀表(15)
- 循环-10. 求序列前N项和(15)
- 循环-14. 最大公约数和最小公倍数(15)