Algorithme jugement dernier - Nathan Deroche#32
Open
NanaNana64 wants to merge 5 commits intobcalou:mainfrom
Open
Algorithme jugement dernier - Nathan Deroche#32NanaNana64 wants to merge 5 commits intobcalou:mainfrom
NanaNana64 wants to merge 5 commits intobcalou:mainfrom
Conversation
|
Un vrai travail de délégué |
bcalou
reviewed
Nov 17, 2023
__main__.py
Outdated
Comment on lines
+11
to
+14
| if not is_valid_date(user_input): | ||
| continue | ||
|
|
||
| break |
Owner
There was a problem hiding this comment.
Si on inverse la condition, la structure sera simplifiée
doomsday/date.py
Outdated
| # doesn't exist (for example : 2021-18-45), then return False and print | ||
| # an error message | ||
| except ValueError: | ||
| print("Incorrect date format. Please use the format YYYY-MM-dd.") |
Owner
There was a problem hiding this comment.
Le commentaire et le comportement réel ne sont pas cohérents. Si je passe une date bien formatée mais inexistante, j'ai l'impression que j'aurai le message me disant que ma date est mal formatée, non ?
doomsday/algorithm.py
Outdated
| """ | ||
| Returns the day of the week for the given date in the format YYYY-MM-dd. | ||
| """ | ||
| from datetime import datetime |
doomsday/algorithm.py
Outdated
|
|
||
| def get_doomsday_year(year: int) -> int: | ||
| """Gets the doomsday of the year as an integer between 0 and 6""" | ||
| last_two_numbers_of_year: int = year % 100 |
Owner
There was a problem hiding this comment.
numbers -> digits (plus précis, comme nombre VS chiffre en français)
Owner
|
Le code est soigné mais le test sur l'algo lui-même ne passe pas. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.