Alright i am totaly new to python and could really use some help. I need a program that will run and starting at "2:00" count down all the way to "0:00". The left side being minutes and the right side being seconds. so 120 seconds total. I have no idea how to get it into this format or where to even start if someone could show me some example scripts or help me out in any way that would be great. Thanks
aaron.breen.50
0
Newbie Poster
Recommended Answers
Jump to PostYou would want something like this:
for t in range(120,-1,-1): minutes = t / 60 seconds = t % 60 print "%d:%2d" % (minutes,seconds) # Python v2 only time.sleep(1.0)
... but that just prints out the time left. If you're supposed to put the time in …
Jump to PostTo get a nice display you need to use a GUI toolkit like the one that comes with your Python installation. Here is an example, study it carefully ...
''' tk_counter_down101.py count down seconds from a given minute value using the Tkinter GUI toolkit that comes with …
All 7 Replies
BearofNH
104
Posting Whiz
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
aaron.breen.50
0
Newbie Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Catrudo
0
Newbie Poster
Anna_5
0
Newbie Poster
rproffitt
2,565
"Nothing to see here."
Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.