0% found this document useful (0 votes)
24 views

Word File

The document describes a digital clock project made by a student named Anshul Jain for their class 11 practical exam. It contains approvals from the principal and teacher acknowledging the completion of the project. It also explains how the clock was programmed using Python Tkinter and strftime functions to display the current time in a label widget centered on the window. The coding section shows the Python code used to create the digital clock application.

Uploaded by

ANSHUL YT BOSS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Word File

The document describes a digital clock project made by a student named Anshul Jain for their class 11 practical exam. It contains approvals from the principal and teacher acknowledging the completion of the project. It also explains how the clock was programmed using Python Tkinter and strftime functions to display the current time in a label widget centered on the window. The coding section shows the Python code used to create the digital clock application.

Uploaded by

ANSHUL YT BOSS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

1

Acknowledge with immense gratitude and the


deep sense of respect and encourage ion and
useful help to me by our principal
Dr.ABHINAV SHUKLA and my computer
science teacher Mr. Vishal Katarein
selection and planning of this project. I also
extent my heartiest thanks to for their precious
help and co-operation to make my effort
succeed.
This is to verify that the project report entitled
“Digital Clock” which is being submitted by
“Anshul Jain” class XI ‘Commerce’ from
Gyanodaya Senior Secondary School Khurai
for home exam of the year 2022-2023 has been
duly completed as record of bonafide both in
respect of its contents and its literacy presentation
for being referred to the computer science
teacher.

PRINCIPAL GUIDED BY
DR.AbhinavShukla Mr. Vishal Katare
We are the student of class Xl ‘C’ of
Gyanodaya Senior Seconday School
Khuraideclare that this project has been
designed by me under the kind guidance of
Mr. Vishal Katare. This is my original work,
this project has been designed for practical
exam (2022-2023) computer science.
To remain motivational and to learn from
various experience and sources. It is
necessary that we should actively participate
in the learning process.
This is particular important in case in
science. In the experiment of doing
investigatory project can provide can provide
me new knowledge and new skills to that I
may enter into the world of science with
technology.
Python is an interpreted, object-oriented, high-
level programming language with dynamic
semantics. Its high-level built in data structures,
combined with dynamic typing and dynamic
binding, make it very attractive for Rapid
Application Development, as well as for use as a
scripting or glue language to connect existing
components together. Python's simple, easy to
learn syntax emphasizes readability and therefore
reduces the cost of program maintenance. Python
supports modules and packages, which
encourages program modularity and code reuse.
The Python interpreter and the extensive standard
library are available in source or binary form
without charge for all major platforms, and can be
freely distributed.
TKINTER
Tkinter is a Python binding to the Tk GUI
toolkit. It is the standard Python interface to the
Tk GUI toolkit, and is Python's de facto
standard GUI. Tkinter is included with standard
Linux, Microsoft Windows and Mac OS X
installs of Python. The name Tkinter comes
from Tk interface.

STRFTIME
The strftime() function places bytes into the
array pointed to controlled by the string pointed
to by format.The format string consist of zero or
more conversion specifications and ordinary
characters.
SUMITA ARORA CLASS XI

W3 SCHOOL

WWW.GOOGLE.COM
CODING:-
# importing whole module

from tkinter import *

# importing strftime function to

# retrieve system's time

from time import strftime

# creating tkinter window

root = Tk()

root.title('GYANODAYA')

root.geometry("1600x1000")

root.configure(bg='#80e5ff')

logo = PhotoImage(file = 'D:\gyanodaya_logo-removebg-preview.png')

img=Label(image=logo,background="#80e5ff")

img.pack()

# This function is used to

# display time on the label

def time():

    string = strftime('%I:%M:%S %p')


    lbl.config(text=string)

    lbl.after(1000, time)

   

# Styling the label widget so that clock

# will look more attractive

lbl = Label(root, font=('calibri', 80, 'bold'),

            background='#80e5ff',

            foreground='#000')

# Placing clock at the centre

# of the tkinter window

lbl.pack(anchor='center')

txt=Label(text="MADE BY :- ANSHUL JAIN",font=('calibri', 80, 'bold'),

            background='#80e5ff',

            foreground='#000')

txt.pack(pady=100,)

time()

mainloop()
DEFINE CODING:-
1)from tkinter import *

In order to work with a tkinter application, we have to install and import the tkinter
library in our environment. Generally, we import the tkinter library in the
environment by using from tkinter import * command. The significance of "import
*" represents all the functions and built-in modules in the tkinter library.
2) from time import strftime

strftime(format[, t]) is present in time module. time. strftime(format[, t])


function convert a tuple or struct_time representing a time as returned by
gmtime() or localtime() to a string as specified by the format argument. If t is
not provided, the current time as returned by localtime() is used.

3) root.title('GYANODAYA')

It is tittle given to your pages

4)root.geometry("1600x1000")

It is a window size.

5)logo = PhotoImage(file = 'D:\gyanodaya_logo-removebg-preview.png')

img=Label(image=logo,background="#80e5ff")

img.pack()

It is the image .

6)def time():

time() Function. In Python, the time() function returns the number of seconds


passed since epoch (the point where time begins). For the Unix system, January
1, 1970, 00:00:00 at UTC is epoch

7)string = strftime('%I:%M:%S %p')

    lbl.config(text=string)

    lbl.after(1000, time)

By this the is time is shown on the window


8)lbl = Label(root, font=('calibri', 80, 'bold'),

            background='#80e5ff',

            foreground='#000')

This is style of page in which there is font, background colour ,is present.

9)lbl.pack(anchor='center')

By this all items are in center.

10)txt=Label(text="MADE BY :- ANSHUL JAIN",font=('calibri', 80, 'bold'),

            background='#80e5ff',

            foreground='#000')

txt.pack(pady=100,)

time()

mainloop()

By this text is shown on page or our program will end.

   
\

You might also like