LoginSignup
0
0

More than 1 year has passed since last update.

paizaラーニング「指定された行数の数字の出力 Python3編」

Posted at

私の解答

n = int(input())
for i in range(n):
    print("1 2 3 4 5")

二重ループメニューの問題集なので、私の解答は、手抜きでした^^;

解答例

n = int(input())
for _ in range(n):
    for i in range(1, 6):
        if i == 5:
            print(i)
        else:
            print(i, end=" ")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0