-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature tarea buenas practicas #8
base: main
Are you sure you want to change the base?
Feature tarea buenas practicas #8
Conversation
|
||
class CodeBreaker: | ||
|
||
def adivinar(self, numero=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combinas nombres de variables, funciones y constantes entre español e ingles, te recomiendo mantener constancia con un solo idioma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tambien te recomiendo darle un nombre mas descriptivo a esta función.
return "Error: number must have 4 digits" | ||
|
||
if numero == TRUE_NUMBER: | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Te recomiendo mantener constancia en el tipo de valor que vas a retornar, ya que en este momento estás combinando entre strings y booleans
else: | ||
caracter += ' ' | ||
|
||
return caracter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Podrias modificar la logica para que agrupe primero las (X), luego los (_) bajos y por ultimo los espacios?
return True | ||
|
||
caracter = '' | ||
array_number = [1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puedes agregar un comentario a esta variable explicando que hace?
El siguiente código ya cuenta con el formato aplicado y linter.
Se relizan las adecuaciones para escribir código respetando el Zen de Python.