-
Notifications
You must be signed in to change notification settings - Fork 979
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
Added "run until valid" feature #56
base: main
Are you sure you want to change the base?
Conversation
Can someone add colors to it |
idk if the maintainer of this project abandoned it or something but there is already an open pull request with this exact feature and more. |
No deffenately not just busy with exams etc lately |
@@ -38,9 +39,25 @@ def main(self): # The main function contains the most important code | |||
time.sleep(2) # Wait a few seconds | |||
self.slowType("Made by: Drillenissen#4268 && Benz#4947", .02) # Print who developed the code | |||
time.sleep(1) # Wait a little more | |||
self.slowType("\nInput How Many Codes to Generate and Check: ", .02, newLine = False) # Print the first question | |||
self.slowType("\nRun until valid code is found? y/n ", .02, newLine = False) | |||
infinite_choice = input('') |
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.
elif infinite_choice == "n" or infinite_choice == "N":
if infinite_choice == "y" or infinite_choice == "Y":
Those "or" in the beginning are unnecessary.
You could just use:
infinite_choice = input('').lower()
and then all of those wouldn't be necessary.
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.
You could add a .strip()
to infinite choice too.
infinite_choice = input('').lower().strip()
making the user life easier.
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.
Or just use a check if it is in like if "y" in input.lower()
Current Functionality
As of right now, the only option for generation of codes is to input the amount of codes you want the program to check for, this can get quite annoying long-term to have to check each periodically to restart the program.
Issue #34
Run Until Valid
My PR lets the user run the program for an indefinite amount of time until a valid code is found.
New behavior
Upon starting of the program, the user will be asked if he/she wants to run the program until a valid code is found or generate a specified amount of codes.