Mini Python Project Tutorial - Alarm Clock

preview_player
Показать описание
Today, I'll be walking you through a mini-python project, where we will create an alarm clock/timer. This straightforward course will show you how to play sound and how you can create a FANCY thing with the terminal!

⭐️ Timestamps ⭐️
00:00 | Project Overview
01:12 | Project Setup
02:40 | Project Walkthrough

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
- Tech With Tim
- Python Development
- Coding

⭐️ Hashtags ⭐️
#techwithtim #developer #python #howtolearncoding
Рекомендации по теме
Комментарии
Автор

I'm very new to python and just came from the password generator mini project video and was searching for more. Please do more and put them in a playlist. I was told the best way to learn python is to do mini projects and build your skill from there. These are so simple and you explain it so well as we follow along. Thank you so much for doing these! Please keep it up :D

janayascott
Автор

Alternative:
import time
def alarm(secs):
for x in range(secs, -1, -1):
minutes, seconds = divmod(x, 60)
print(f"\r{minutes:02d}:{seconds:02d}", end="")
time.sleep(1)
print("Time Up!")

alarm(5)

rohitjain
Автор

it took me 3 hours to figure out. Thank you so much. I am just a beginner.This veido helped me alot.I need that kind of easy projects to upgrade my python level

shyne
Автор

I like so much this kind of project. It's nice to practice and see how it works

diegosantosmoto
Автор

Bring more of these small projects please

sauraabh
Автор

for those getting error at CLEAR_AND_RETURN part, replace your print statement with this-
print(f"\r{minutes_left:02d}:{seconds_left:02d}", end='', flush=True)
hope this

KnowAiShortsnd
Автор

Well that was fun Tim!!! Loved it!!!

NiceChange
Автор

if anyone has an error with getting "playsound" to install, namely:

"note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output."

Try opening cmd and running python.

pip install --upgrade wheel

Then try to run:

pip install playsound

it fixed my issue.

peterfargo
Автор

is it just me or did anyone else couldn't manage to intall the playsound module either? Mine simply wouldn't get installed.

homieee_lander
Автор

I would like to see you do videos for intermediate or cool medium projects

אילאיברשלום-קז
Автор

Can you do a video about strucurization of bigger python projects? Where to put the classes, how to enclose helper functions into packages, how to properly name your files?

mddawid
Автор

Great video.. please make some videos on API development using python as those are the buzz words nowdays

Techtalkswithrahul
Автор

That can be very useful for video game development...

SkyFly
Автор

For some reason my CLEAR_AND_RETURN = "\033[H" does not work, I am using windows 10 and python V3.11.

williamdelatorre
Автор

guys if you are getting an error try using a .wav file for the sound

pablozuta
Автор

I like this small projects. You can see how in practise use function, loops, etc 🤗 But what I still can not understand, in what sequence code must be written? It's looks for me, input should be above def alarm() function. I still can not understand what should be where??? 🤔

ssigitas
Автор

It didn't work for me, though I did as 10:24 CLEAR_AND_RETURN the code remained exactly equal. keep as a colum of numbers
the run keeps like:
Alarm Will be sound in: 00:04
Alarm Will be sound in: 00:03
Alarm Will be sound in: 00:02
Alarm Will be sound in: 00:01
Alarm Will be sound in: 00:00

can you help me pls? The code is exactly the same.

soe
Автор

Bro, ANSI characters are not working in pycharm help me😢

saranshbalian
Автор

This looks very smart:
"2 from playsound import playsound"

I will write for myself...

dWnT
Автор

Great mini project, but why not use divmod() function for time and the os module for clearing?

youssefsn