Skip to content

Conversation

@akayy-dev
Copy link

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.

@akayy-dev akayy-dev mentioned this pull request May 26, 2021
@AcidClown
Copy link

Can someone add colors to it

@akayy-dev
Copy link
Author

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.

@logicguy1
Copy link
Owner

No deffenately not just busy with exams etc lately

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('')

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.

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.

Copy link
Owner

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()

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.

6 participants