-
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
Matias Rodeghiero #6
base: main
Are you sure you want to change the base?
Conversation
Se agregó que devuelva un símbolo # para el caso que no se adivine ningún número además de validaciones extras.
if trueNumber == '': | ||
return 'Number is not defined' | ||
def __init__(self): | ||
self.TRUE_NUMBER = '1025' |
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.
Nice
|
||
if numero == trueNumber: | ||
return True | ||
def adivinar(self, intento=0, 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.
Te recomiendo mantener consistencia entre los nombres de las variables y las funciones en un solo idioma 😄 y quizá ser mas específico, como guess_number.
if numero == trueNumber: | ||
return True | ||
def adivinar(self, intento=0, numero=None): | ||
self.arrayNumber = [] |
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.
Recuerda que se recomienda en pep8 usar snake_case para nombrar las variables
if numero == self.TRUE_NUMBER: | ||
return intento, 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.
Recuerda intentar mantener un mismo idioma a través de tus variables
elif numero[x] in self.TRUE_NUMBER: | ||
self.arrayNumber.append("X") | ||
else: | ||
self.arrayNumber.append("#") |
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?
No description provided.