2001-09-23から1日間の記事一覧

読み込んだ月の季節を表示 (論理演算子)

明解C言語 入門編 > 3. プログラムの流れと分岐 > 読み込んだ月の季節を表示 (論理演算子) Python # coding: Shift_JIS month = int(raw_input("何月ですか:")) if (3 <= month) and (month <= 5): print "春です。" elif (6 <= month) and (month <= 8): …