geekcomputers / geekcomputers/Python
Conditionals with time
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 35.4k
- Forks
- 12.9k
- Merge medio
- 2 h 37 min
- PR fusionados (30 d)
- 1
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
El issue no nombra ningún archivo ni prueba. Empieza inspeccionando el repositorio en busca del ejemplo o ejercicio que maneja condicionales y, después, usa los rangos de horas y minutos indicados para determinar el restaurante seleccionado según la prioridad. Se considera terminado cuando el ejemplo maneja la franja de 10PM–5AM y los horarios de cierre indicados, incluido Waffle House como fallback.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100