LoginSignup
0
0

More than 1 year has passed since last update.

多言語FizzBuzzチャレンジ2日目:Python

Last updated at Posted at 2022-12-01

ここまでのまとめ

本日のお品書き

みんな(?)大好きPythonです。Python3.11から高速化が折り込まれているので、for文を回しても心が痛まないですね!

FizzBuzz

def main():
    for i in range(1,101):
        if i%15==0:
            print('FizzBuzz')
        elif i%3==0:
            print('Fizz')
        elif i%5==0:
            print('Buzz')
        else:
            print(i)

main()

特に難しいことは無いですね…。

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