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問題集】標準出力メニュー/改行あり出力

Posted at

Paiza問題集

Pythonで回答

標準出力メニュー 改行あり出力

Step1 1行の出力

"""
1行の出力
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__newline_digit_step1
"""

# 整数813を表示する
print(813)

Step2 2行の出力

"""
2行の出力
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__newline_digit_step2
"""

# 8と13を2行で出力する
print(8)
print(13)

Step3 3行の出力

"""
3行の出力
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__newline_digit_step3
"""

# 8,1,3を出力する
print(8)
print(1)
print(3)

Step4 10行の出力

"""
10行の出力
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__newline_digit_step4
"""

# 配列に数字の列を代入する
numbers = [813, 1, 2, 923874, 23648, 782356, 3256, 2342, 24324, 112]

# 数字の列を表示する
for num in numbers:
    print(num)

Final問題

"""
【改行あり出力】1000行の出力
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__newline_digit_boss
"""

# 1から1000まで表示する
for i in range(1, 1001):
    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?