Skip to content
← Back to Community
Timer!
Profile icon
PYer

Open in full screen: Timer
I coded this timer. You can type in the amount of minutes, and the amount of seconds you want it to last. It prints the numbers in ASCII art, and the color is randomly generated to make it more appealing. "TIMES UP!!!" is displayed when it is over. amasad told me about bell codes and now it makes a beeping sound! Thank you, and please upvote if you like this! Thanks again!
This file cannot be displayed: https://storage.googleapis.com/replit/images/1545184996593_5f9bb50bc710d9853e813bf4b8cb1ea6.pn

Voters
Profile icon
ImInAClub
Profile icon
KamilaArias
Profile icon
TengkuAmalinFat
Profile icon
rorr
Profile icon
CoolJames1610
Profile icon
CodingGoose
Profile icon
Nikaknight
Profile icon
Acer123
Profile icon
KadenTruman
Profile icon
TimothyYates
Comments
hotnewtop
Profile icon
gantr833

Really Good Job. It skips a couple of numbers when the writing runs behind. Overall, great job!!!!!!

Profile icon
PYer

@gantr833 I fixed that a few days ago.

Profile icon
JHightower835

Sorery to bother but there is no volumne to this program. Could you please turn the sound up

Profile icon
JHightower835

@JHightower835 Nevermind, just remebered I don't own a computer

Profile icon
B0T

this is awesome!

Profile icon
PYer

@B0T Thanks!

Profile icon
HappyFakeboulde

A few bugs (otherwise it's pretty good):
Line 24 -- waiting 0.9 seconds, even though it would make sense for it to be one second... why?!
Line 3/4 -- you get the starting time before the user input, leading to bugs with the timing being off by ~20 seconds (it could actually be any amount, i guess that's just how long it took me
Line 27 -- you know python has string multiplication, right?

Profile icon
HappyFakeboulde
Profile icon
PYer

@HappyFakeboulde Thanks! What is string multiplication?

Profile icon
HappyFakeboulde

@PYer It's a feature of python in which you have a string, the multiplication operator (*), and an integer. It's an expression with the value of the string, repeated a number of times defined by the number, as a new string, e.g. "hfb" * 3 == "hfbhfbhfb". There's also a similar technique with tuples and lists. For another example, see line 27 of my modified timer program.

Profile icon
HappyFakeboulde

@PYer BTW the link's broken from you changing your username

Profile icon
PYer

@HappyFakeboulde Oh yeah. I know what you meant. I didn't think of doing that. Thanks.

Profile icon
HarperframeInc

It's a normal clock, but its not a normal clock.

Profile icon
PYer

@HarperframeInc I'll take that as a compliment

Profile icon
Zavexeon

This is pretty good.

Profile icon
PYer

@Zavexeon Thanks!

Profile icon
badvillain01

nice good job

Profile icon
PYer
Profile icon
amasad

This is awesome! I'm going to use to time my tasks. I'd love for it to make sounds so I forked it and add it the BELL code. Can you update it?
https://repl.it/@amasad/Timer

Profile icon
PYer

@amasad Yeah! Thank you so much for showing me the bell code!

Profile icon
DrankArizonaIce

That's pretty cool!
You should make it display 2 digits (01, 02, 09, etc) for the seconds like it's an 8 segment display :0

Profile icon
PYer

@DrankArizonaIce Oh. I will try to fix that. I didn't notice that. Thanks for telling me!

Profile icon
[deleted]

Now this is impressive nice work!

Profile icon
PYer

@IEATPYTHON Thanks!

Profile icon
TengkuAmalinFat

can anybody help me on how to repeat the timer??

Profile icon
coderash

So cool, could you add a stopwatch as well?

Profile icon
PYer

@coderash Good idea! I will work on it later maybe

Profile icon
mkhoi

I LOVE ASCII ART!!!!!!!!!!!!!

Profile icon
PYer

@mkhoi thanks! I used @replitcode codes ascii art module.