A Python-based alarm clock that forces you to solve math problems to stop the alarm. No cheating. No closing the window. No mercy.
This project combines GUI, sound, threading, and logic to create a smart alarm system that actually wakes you up.
- โฐ Set alarm using 12-hour or 24-hour format
- ๐งฎ Random math questions to stop the alarm
- ๐ Continuous alarm sound until correct answer
- ๐ฅ๏ธ User-friendly GUI (Tkinter)
- ๐ Anti-escape system (cannot close window without solving math)
- ๐งต Background alarm monitoring (threading)
When the alarm rings, a math challenge pops up, for example:
Solve to stop alarm:
12 x 4 = ?
If you fail โ alarm continues ๐ If you succeed โ freedom ๐
- Python 3.14
- Tkinter (GUI)
- winsound (Windows audio)
- threading
- datetime
- regex (time parsing)
git clone https://github.com/your-username/Math_Alarm.gitcd Math_Alarmpython script.pyMake sure you have an alarm sound file named:
Alarm.wav
Place it in the same folder as the Python file.
You can replace it with any .wav sound.
-
Enter alarm time:
- Example:
7:30 AMor19:30
- Example:
-
Click Set Alarm
-
Wait for the alarm โณ
-
Solve the math question to stop it ๐ง
| Format | Example |
|---|---|
| 12-hour | 6:45 AM |
| 12-hour | 9:10 PM |
| 24-hour | 06:45 |
| 24-hour | 21:10 |
- Works best on Windows (uses
winsound) - Closing the window will not stop the alarm ๐
- Math difficulty is random (easy to medium)
- Difficulty levels (Easy / Hard / Insane)
- Multiple alarms
- Dark mode UI
- Cross-platform sound support
- Alarm history and statistics
- Mobile version (Android)
Pull requests are welcome. If you have ideas to make the alarm more evil or more useful, feel free to contribute.
This project is licensed under the MIT License.
Created by Dixon-Codes A developer who decided normal alarms are too easy.