geekcomputers / geekcomputers/Python
Conditionals with time
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 35.4k
- フォーク
- 12.9k
- 平均マージ
- 2時間 37分
- マージ済み PR(30日)
- 1
説明
Looking for help on this...
hour = 3
minute = 45
There are plenty of places to get a late night bite to eat. However, they have different hours, so when choosing where to go, you have to think about who's still open!
Imagine you're choosing between the following restaurants:
Barrelhouse: Closes at 11:00PM
Taco Bell: Closes at 2:00AM
Cookout: Closes at 3:00AM
Waffle House: Never closes. Ever.
Assume that this list is also a priority list: if Barrelhouse is open, you choose Barrelhouse. If not, you choose Taco Bell if it's open. If not, you choose Cookout if it's open. If
not, you choose Waffle House.
However, there are two wrinkles:
We're using 12-hour time. hour will always represent a time from 10PM to 5AM.
That means that if hour is 10 or 11, it's PM; if hour is 12, 1, 2, 3, 4, or 5, it's AM. This will make your reasoning a little more complex. You may assume that all four restaurants open later than 6AM, though, so you don't have to worry about opening time, just closing time.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue ではファイルもテストも指定されていません。まず、条件分岐を扱う例または演習をリポジトリ内から探して確認し、次に、指定された時刻と分の範囲を使って、優先順位に基づいて選択されるレストランを特定します。例が 10PM–5AM の時間帯と、一覧にある閉店時刻を扱い、フォールバックとして Waffle House を含んでいれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100