---
# System prepended metadata

title: 17-9：印圖形1
tags: [DICE Python]

---

---
title: 17-9：印圖形1
lang: zh-tw
tags: DICE Python
---


17-9：印圖形1
===

> [name=Chinglin-K]

---

目錄：[Dice 程式教學-Python完整版](https://hackmd.io/@Chinglin-K/Dice-menu)
上一篇：[17-8：找因數](https://hackmd.io/@Chinglin-K/Dice-17-8)
下一篇：[17-10：印圖形2](https://hackmd.io/@Chinglin-K/Dice-17-10)

---
## 題目
輸入一正整數N，N的範圍在1-9之間，產生由整數1~N所形成的圖形，圖形如下。

輸入範例:
5
輸出範例:
1
22
333
4444
55555

    
---

## 程式碼
    
```Python=
n=int(input())
for i in range(n):
    for j in range(i+1):
        print(i+1,end="")
    print("")
```
    
---

## 輸出
    
```Python=
```
    
---

目錄：[Dice 程式教學-Python完整版](https://hackmd.io/@Chinglin-K/Dice-menu)
上一篇：[17-8：找因數](https://hackmd.io/@Chinglin-K/Dice-17-8)
下一篇：[17-10：印圖形2](https://hackmd.io/@Chinglin-K/Dice-17-10)
    
---

:::info

「盡多少本分，得多少本事」😊
:::

---
    
{%hackmd i1nMRrZcTFmTvoF897K9zg %}