space, slash, backslash, cr = ' ', '/', '\\', '\n'
k = 1
f = open("劉任昌.txt",'w',encoding="utf8")
for i in range(1, k+1):
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 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()
VS code開發環境截圖
程式碼
space, slash, backslash, cr = ' ', '/', '\\', '\n'
k = input('輸入規格: ')
m = input('輸入橫向規格: ')
k, m = int(k), int(m) #將字串k轉integer整數
f = open("蔡英文.txt",'w',encoding="utf8")
for i in range(1, k+1):
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('\n')
f.close()
https://keiime.blogspot.com/2024/03/0319.html
回覆刪除https://tustning.blogspot.com/2024/03/youtube-video-player.html
回覆刪除https://ctz642895.blogspot.com/2024/03/blog-post.html
回覆刪除https://rrrrr-eeeee.blogspot.com/2024/03/aaaaaaaaaaaaaaa.html
回覆刪除https://hui026.blogspot.com/2024/03/blog-post.html
回覆刪除https://addison030.blogspot.com/2024/03/blog-post.html
回覆刪除https://grace8166.blogspot.com/2024/03/blog-post.html
回覆刪除https://yun0205.blogspot.com/2024/03/blog-post.html
回覆刪除https://kk0725.blogspot.com/2024/03/blog-post.html
回覆刪除https://5lujo6.blogspot.com/2024/03/blog-post.html
回覆刪除https://www.blogger.com/blog/post/edit/2910868344786410340/1733809068979819194
回覆刪除https://whitexd.blogspot.com/2024/03/blog-post.html
回覆刪除https://ziyun040818.blogspot.com/2024/03/blog-post_18.html
回覆刪除https://wilson11122.blogspot.com/2024/03/blog-post.html
回覆刪除https://htmlcssjavascriptjavapython.blogspot.com/2024/03/blog-post.html
回覆刪除https://rainhtmlcssjavascriptjavapython.blogspot.com/2024/03/blog-post.html
回覆刪除https://oscarliu1688.blogspot.com/2024/03/blog-post.html
回覆刪除https://ryanareryan.blogspot.com/2024/03/blog-post.html
回覆刪除https://xi715.blogspot.com/2024/03/blog-post.html
回覆刪除https://yuechen613.blogspot.com/2024/03/blog-post.html
回覆刪除https://kevin124574811.blogspot.com/2024/03/blog-post.html
回覆刪除https://honghikun.blogspot.com/2024/03/blog-post.html
回覆刪除https://yyyyyyjuuuuuuuu.blogspot.com/2024/03/htmlcssjavascriptjavapython.html
回覆刪除https://chin-0908.blogspot.com/2024/03/space-slash-backslash-cr-n-k-9-f-open.html
回覆刪除作者已經移除這則留言。
回覆刪除作者已經移除這則留言。
回覆刪除作者已經移除這則留言。
回覆刪除https://doryee00000000.blogspot.com/2024/03/36-37.html
回覆刪除https://imyuannn.blogspot.com/2024/03/blog-post_21.html
回覆刪除https://yiminglinn.blogspot.com/2024/03/blog-post.html
回覆刪除https://682amber.blogspot.com/2024/03/blog-post.html
回覆刪除https://pcai766.blogspot.com/2024/03/blog-post_21.html
回覆刪除https://www.blogger.com/blog/post/edit/preview/141866742300809757/3134764175606787896
回覆刪除https://the-most-great-teather.blogspot.com/2024/03/blog-post.html
回覆刪除https://themostgreatteacher.blogspot.com/2024/03/blog-post.html
回覆刪除作者已經移除這則留言。
回覆刪除https://the-most-great-chenxi.blogspot.com/2024/03/blog-post.html
回覆刪除