space, slash, backslash, cr = ' ', '/', '\\', '\n'
k = input('邊長: ') #輸入字串
m = input('橫向: ')
k, m = int(k), int(m)
f = open("難嗎.txt",'w',encoding='utf8')
f.write('劉任昌讀取檔案' + cr)#註解\n換列
for i in range(9):
f.write(str(i))
f.write(cr)
for i in range(1, k+1): #迴圈1到k
for ii in range(m):
for j in range(k-i):
f.write(space)
f.write(slash)
for j in range(2*i-2):
f.write(space)
f.write(backslash)
for j in range(k-i):
f.write(space)
f.write(cr)
for i in range(1, k+1):
for ii in range(m):
for j in range(i-1):
f.write(space)
f.write(backslash)
for j in range(2*k-2*i):
f.write(space)
f.write(slash)
for j in range(i-1):
f.write(space)
f.write(cr)
f.close()
385影片
https://naiyuanzhang1226.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://kuoyiting.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://e99136.blogspot.com/2024/03/blog-post_21.html
回覆刪除https://su-you-an.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://chan-wan-yi.blogspot.com/2024/03/blog-post_21.html
回覆刪除https://linziwei0308.blogspot.com/2024/03/blog-post.html
回覆刪除https://laiweikaiaaa.blogspot.com/2024/03/writerange.html
回覆刪除https://kitty030994.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://stanley-ouo.blogspot.com/2024/03/382-383-space-slash-backslash-cr-n-k.html
回覆刪除https://sandy06252023.blogspot.com/2024/03/pythonwrite.html
回覆刪除https://caipeishan1223.blogspot.com/2024/03/blog-post.html
回覆刪除https://liu-guang-wei.blogspot.com/2024/03/pythonwriterange.html
回覆刪除作者已經移除這則留言。
回覆刪除https://the-most-little-black.blogspot.com/
回覆刪除https://wang-yu-jia-wangyujia.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://guan-yu-zhu.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://zzl1102.blogspot.com/2024/03/phthonwriterange.html
回覆刪除https://wenhuichenchen.blogspot.com/2024/03/blog-post.html
回覆刪除https://xu0625.blogspot.com/2024/03/blog-post.html
回覆刪除https://ymo0831.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://linchinppei.blogspot.com/2024/03/writerange.html
回覆刪除https://chienyinghuan.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://zhen-zhen4869.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://wujiaqi1010.blogspot.com/2024/03/phthonwriterange.html
回覆刪除https://shenzhenxuan.blogspot.com/2024/03/blog-post.html
回覆刪除https://liu0301.blogspot.com/2024/03/blog-post.html
回覆刪除https://zxnhtml.blogspot.com/2024/03/pythonwrite.html
回覆刪除https://yang0218.blogspot.com/2024/03/space-slash-backslash-cr-n-k-input-m.html
回覆刪除https://fgjjfufutfytfyyfyuk.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://wnagenqiiiiiiiiiiii.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://hank20050328.blogspot.com/2024/03/space-slash-backslash-cr-n-k-input-m.html
回覆刪除https://li1007.blogspot.com/2024/03/pythonwriterange.html
回覆刪除https://wuhongbing.blogspot.com/2024/06/pythonwriterange.html
回覆刪除