Skip to content

Conversation

@XavierCor
Copy link

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.


class CodeBreaker:

def adivinar(self, numero=None):
Copy link
Owner

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.

Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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]
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants