diff --git a/Digital Clock/Clock.py b/Digital Clock/Clock.py new file mode 100644 index 0000000000..da49a7d978 --- /dev/null +++ b/Digital Clock/Clock.py @@ -0,0 +1,18 @@ +from tkinter import * +from tkinter.ttk import * + +from time import strftime + +root = Tk() +root.title = ("Clock") + +def time(): + string = strftime('%I:%M:%S %p') + label.config(text=string) + label.after(1000,time) + +label = Label(root, font=("ds-digital", 80), background = "black", foreground = "cyan" ) +label.pack(anchor='center') +time() + +mainloop() diff --git a/Digital Clock/README.md b/Digital Clock/README.md new file mode 100644 index 0000000000..01fd2e525a --- /dev/null +++ b/Digital Clock/README.md @@ -0,0 +1,28 @@ + +# Digital Clock +## Description +A simple digital 12 hour clock. +- This is can be used for implementations as one of the features. + +### Language +- [X] Python + +### Checklist +Name | About +:------------------ | :------------------ +Digital Clock | Shows the current time in 12 hour format + +### Usage +To access the `Cloak`, this application imports the following modules. +```python +import os +import time +``` + +### Instructions to run this application + + 1. Download and Run the Clock.py + 2. It will display the time in 12 hour format + +##### Sample Output + Image of sample output has been added with the program. diff --git a/Digital Clock/Sample Output.png b/Digital Clock/Sample Output.png new file mode 100644 index 0000000000..a75a263ca4 Binary files /dev/null and b/Digital Clock/Sample Output.png differ