We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
jaccuse/main.py
Line 196 in 7e10ab5
Instead of this block:
if duration == "sec": update_display(counter, duration) sleep(1) counter += 1 elif duration == "min": update_display(counter, duration) sleep(60) counter += 1 elif duration == "hour": update_display(counter, duration) sleep(3600) counter += 1 elif duration == "day": update_display(counter, duration) sleep(86400) counter += 1 else: print("error") break
You can have a dictionary like: duration_dict = {"sec":1, "minute":60, "hour":3600, "day":86400} And then replace the block with:
duration_dict = {"sec":1, "minute":60, "hour":3600, "day":86400}
if duration: update_display(counter, duration) sleep(duration_dict[duration]) counter += 1 else: print("error") break
The text was updated successfully, but these errors were encountered:
No branches or pull requests
jaccuse/main.py
Line 196 in 7e10ab5
Instead of this block:
You can have a dictionary like:
duration_dict = {"sec":1, "minute":60, "hour":3600, "day":86400}
And then replace the block with:
The text was updated successfully, but these errors were encountered: