はじめに
このプロジェクトでは、指定された年のすべての日曜日を出力するPythonスクリプトを作成する方法を学びます。これは、プログラミングプロジェクトで日付や時間関連のタスクを扱う必要がある人にとって役立つスキルです。
👀 プレビュー
python Sunday.py 2022
2022-01-02
2022-01-09
2022-01-16
2022-01-23
2022-01-30
2022-02-06
2022-02-13
2022-02-20
...
🎯 タスク
このプロジェクトでは、以下のことを学びます。
- Pythonの
datetime
とcalendar
モジュールを使用して日付を扱う方法 - 指定された年のすべての日曜日のリストを計算して返す関数を書く方法
- Pythonスクリプトでユーザー入力とコマンドライン引数を扱う方法
- スクリプトを拡張してカスタマイズし、より柔軟でユーザーフレンドリーにする方法
🏆 成果
このプロジェクトを完了すると、以下のことができるようになります。
- Pythonで日付と時間を扱う方法を理解する
- 指定された年のすべての日曜日を出力するスクリプトを書く
- 異なる年やユーザー入力を処理するようにスクリプトをカスタマイズする
- 新しく学んだ知識をプログラミングプロジェクトの他の日付関連のタスクに適用する
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
python(("Python")) -.-> python/ControlFlowGroup(["Control Flow"])
python(("Python")) -.-> python/FunctionsGroup(["Functions"])
python(("Python")) -.-> python/ModulesandPackagesGroup(["Modules and Packages"])
python(("Python")) -.-> python/PythonStandardLibraryGroup(["Python Standard Library"])
python/ControlFlowGroup -.-> python/conditional_statements("Conditional Statements")
python/FunctionsGroup -.-> python/arguments_return("Arguments and Return Values")
python/ModulesandPackagesGroup -.-> python/standard_libraries("Common Standard Libraries")
python/PythonStandardLibraryGroup -.-> python/date_time("Date and Time")
subgraph Lab Skills
python/conditional_statements -.-> lab-302733{{"任意の年の日付の処理"}}
python/arguments_return -.-> lab-302733{{"任意の年の日付の処理"}}
python/standard_libraries -.-> lab-302733{{"任意の年の日付の処理"}}
python/date_time -.-> lab-302733{{"任意の年の日付の処理"}}
end