Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Time Countdown Project Report

Project Overview

The Time Countdown project is a simple desktop application developed using Python and the Tkinter
library. The application allows users to input a countdown time in hours, minutes, and seconds, and
then it counts down to zero, displaying a message when the time is up.

Objectives

- To create a user-friendly graphical interface for setting a countdown timer.


- To implement functionality to convert user input into seconds for countdown calculations.
- To update the interface in real-time to display the remaining time.
- To notify the user when the countdown reaches zero.

Implementation Details

Libraries Used

- Tkinter: This standard Python library is used for creating the graphical user interface (GUI).
- time: This module is used to implement the countdown functionality with delays.

GUI Components

1. Root Window: The main window of the application, titled "Time Counter," with dimensions
300x250 pixels.
2.Entry Widgets: Three entry fields for hours, minutes, and seconds, each with a default value of "00."
3.Button: A button labeled "Set Time Countdown" to start the countdown process.
Code:
Code Breakdown

1. Variable Initialization:

These variables hold the values input by the user and are linked to the Entry widgets.

2. Entry Widgets:

These widgets allow users to input the time for the countdown.

3.Button Widget:

This button starts the countdown when clicked, triggering the submit function.
4. Submit Function:

- Input Conversion: Converts the input hours, minutes, and seconds into total seconds.
- Countdown Loop: Uses a while loop to decrement the time, updating the displayed time every
second.
- Time Update: Updates the values shown in the Entry widgets in real-time.
- Completion Notification: Shows a message box when the countdown reaches zero.

The Output will be:


Setting countdown for 10 seconds:

After 10 seconds the following display box will appear:

Conclusion

The Time Countdown project successfully demonstrates the use of Tkinter for creating a simple yet
functional countdown timer. It provides a foundation that can be expanded with additional features to
enhance usability and functionality.

You might also like