Countdownclock PWP
Countdownclock PWP
Title of Project
“COUNTDOWN CLOCK”
Semester : SIXTH
Roll No : 31
Enrollment No : 2111710337
Seat No :
CERTIFICATE
This is to certify that Mr./Ms Sonawane Sagar Sanjay
roll no 31 of Sixth semester of Diploma in Computer Engineering
has successfully completed the Micro Project in “CountDown Clock”
for the Academic year 2022 -2023 as prescribed in MSBTE
curriculum under the guidance of subject teacher.
Date: Seat No :
2 Step 2
3 Source Code 3
4 Output 5
5 Conclusion 6
6 Reference 7
CO coverage:
1. Apply principle of Production and management in all activities
MS.Ghodake R.B.
Name of Teacher & Sign
Micro Project Proposal
References:
https://www.sciencedirect.com/topics/engineering/countdown-timer
Comments by guide:
MS.Ghodake R.B.
Course Teacher
Micro Project Log Book
Group member:
Sign
Sr. No. Roll No. Name of group member
1
2.STEP
Step 2: Then ask the user to input the length of the countdown in seconds.
Step 3: This value is sent as a parameter ‘t’ to the user-defined function countdown().
Any variable read using the input function is a string. So, convert this parameter to ‘int’
as it is of string type.
Step 5: Use divmod() to calculate the number of minutes and seconds. You can read more
about it here.
Step 6: Now print the minutes and seconds on the screen using the variable time format.
Step 7: Using end = ‘\r’ we force the cursor to go back to the start of the screen (carriage
return) so that the next line printed will overwrite the previous one.
Step 8: The time. sleep() is used to make the code wait for one sec.
Step 9: Now decrement time so that the while loop can converge.
Step 10: After the completion of the loop, we will print “Fire in the hole” to signify the
end of the countdown.
2
3.SOURCE CODE
import time
from tkinter import *
from tkinter import messagebox
root = Tk()
root.geometry("400x300")
# define title
root.title("Countdown timer")
hour_box.place(x=80, y=20)
mins_box = Entry(
root,
width=3,
font=("Arial", 18, ""),
textvariable=minute)
mins_box.place(x=130, y=20)
sec_box = Entry(
root,
width=3,
font=("Arial", 18, ""),
textvariable=second)
sec_box.place(x=180, y=20)
def countdowntimer():
try:
user_input = int(hour.get()) * 3600 + int(minute.get()) * 60 + int(second.get())
except:
messagebox.showwarning('', 'Invalid Input!')
while user_input > -1:
3
mins, secs = divmod(user_input, 60)
hours = 0
if mins > 60:
hours, mins = divmod(mins, 60)
hour.set("{0:2d}".format(hours))
minute.set("{0:2d}".format(mins))
second.set("{0:2d}".format(secs))
root.update()
time.sleep(1)
if (user_input == 0):
messagebox.showinfo("Time Countdown", "Time Over")
user_input -= 1
root.mainloop()
4
4. OUTPUT
5
5. CONCLUSION
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
6
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
7
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
8
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
9
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
1
0
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
1
1
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
1
2
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
1
3
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
1
4
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
1
5
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
1
6
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
1
7
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
1
8
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
1
9
We want to create a
countdown timer that
has a very
interesting After
completion of this
digital stop watch
project I have learnt
some knowledge in
designing the
2
0
Count down timer and
understood the coding
process
And also learn how to
install module as well as
create
gui (graphical user
interface by the help of
tkinter
We want to create a countdown timer that has a very interesting After completion of this stopwatch project
After completion of this digital stop watch project I have learn some knowledge in designing the Count down
clock and understood the coding process.
2
1
6.REFERENCE
I. https://www.studocu.com/in/document/dr-apj-abdul-kalam-technical-university/btech/
countdown-timer/34338944
II. https://www.sciencedirect.com/topics/engineering/countdown-timer
2
2