0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

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

Posted at

私の解答

n = int(input())
for i in range(1,n):
    print(i, end=" ")
print(n)

解答例

n = int(input())
for i in range(1, n + 1):
    if i != n:
        print(i, end=" ")
    else:
        print(i)
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?