Skip to content
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

subh.ftg #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

subh.ftg #53

wants to merge 1 commit into from

Conversation

subh6678
Copy link

No description provided.

Comment on lines +2 to +6





Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary empty spaces

def countdown(time_sec):
while time_sec:
mins, secs = divmod(time_sec, 60)
timeformat = '{:02d}:{:02d}'.format(mins, secs)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.format was popular in python 2.x, if you want you can do the same with f string.

timeformat = f'{mins:02d}:{secs:02d}'

time.sleep(1)
time_sec -= 1

print("stop")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"stop" can be replaced with "countdown ended".

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.

None yet

2 participants