geekcomputers / geekcomputers/Python
Conditionals with time
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 35.4k
- Fork
- 12.9k
- Merge medio
- 2h 37m
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Nell’issue non sono indicati né file né test. Inizia ispezionando il repository alla ricerca dell’esempio o dell’esercizio che gestisce i condizionali, quindi usa gli intervalli di ore e minuti indicati per determinare il ristorante selezionato in base alla priorità. Il lavoro è completato quando l’esempio gestisce la fascia oraria 10PM–5AM e gli orari di chiusura elencati, includendo Waffle House come fallback.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100