| import tkinter as tk | |
| from time import strftime | |
| def light_theme(): | |
| frame = tk.Frame(root, bg="white") | |
| frame.place(relx=0.1, rely=0.1, relwidth=0.8, relheight=0.8) | |
| lbl_1 = tk.Label(frame, font=('calibri', 40, 'bold'), | |
| background='White', foreground='black') | |
| lbl_1.pack(anchor="s") | |
| def time(): | |
| string = strftime('%I:%M:%S %p') | |
| lbl_1.config(text=string) | |
| lbl_1.after(1000, time) | |
| time() | |
| def dark_theme(): | |
| frame = tk.Frame(root, bg="#22478a") | |
| frame.place(relx=0.1, rely=0.1, relwidth=0.8, relheight=0.8) | |
| lbl_2 = tk.Label(frame, font=('calibri', 40, 'bold'), | |
| background='#22478a', foreground='black') | |
| lbl_2.pack(anchor="s") | |
| def time(): | |
| string = strftime('%I:%M:%S %p') | |
| lbl_2.config(text=string) | |
| lbl_2.after(1000, time) | |
| time() | |
| root = tk.Tk() | |
| root.title("Digital-Clock") | |
| canvas = tk.Canvas(root, height=140, width=400) | |
| canvas.pack() | |
| frame = tk.Frame(root, bg='#22478a') | |
| frame.place(relx=0.1, rely=0.1, relwidth=0.8, relheight=0.8) | |
| lbl = tk.Label(frame, font=('calibri', 40, 'bold'), | |
| background='#22478a', foreground='black') | |
| lbl.pack(anchor="s") | |
| def time(): | |
| string = strftime('%I:%M:%S %p') | |
| lbl.config(text=string) | |
| lbl.after(1000, time) | |
| time() | |
| menubar = tk.Menu(root) | |
| theme_menu = tk.Menu(menubar, tearoff=0) | |
| theme_menu.add_command(label="Light", command=light_theme) | |
| theme_menu.add_command(label="Dark", command=dark_theme) | |
| menubar.add_cascade(label="Theme", menu=theme_menu) | |
| root.config(menu=menubar) | |
| root.mainloop() |
Monday, 4 October 2021
Python Project [An application to save any random article from Wikipedia to a text file].
Author October 04, 2021 Projects, Python No comments
Program that converts arrays into a list, loops through the list to form a string using the chr() function
Author October 04, 2021 Python No comments
py{ `"8CobawiqNZh{5"8atbwMuop{ ljYFPggxyPlotting a colourful Scatter Plot using Matplotlib
Author October 04, 2021 Python No comments
Plotting Histogram using Pyplot
Author October 04, 2021 Python No comments
Plotting Colourful Pie Chart In MatPlotlib
Author October 04, 2021 Python No comments
Wednesday, 23 June 2021
HANDLING MISSING DATA (FillNa) IN PANDAS
Author June 23, 2021 Python No comments
HANDLING MISSING DATA (dropna) IN PANDAS
Author June 23, 2021 Python No comments
ILOC[ ] IN PANDAS - PYTHON
Author June 23, 2021 Python No comments
LOC[ ] IN PANDAS - PYTHON
Author June 23, 2021 Python No comments
Tuesday, 22 June 2021
EXPORT DATAFRAME TO EXCEL, CSV & TEXT FILE IN PANDAS || SAVE DATAFRAME IN PANDAS
Author June 22, 2021 Python No comments
EXPORT DATAFRAME TO EXCEL, CSV & TEXT FILE IN PANDAS
SORTING DATAFRAME (BY COLUMN) IN PANDAS (Part-2) - PYTHON PROGRAMMING
Author June 22, 2021 Python No comments
MANIPULATING DATAFRAME IN PANDAS (ADD COLUMN , DROP COLUMN) || DATAFRAME MANIPULATIONS
Author June 22, 2021 Python No comments
SORTING DATAFRAME (BY COLUMN) IN PANDAS - PYTHON PROGRAMMING
Author June 22, 2021 Python No comments
#SORTING DATAFRAME (BY COLUMN) IN PANDAS
Monday, 21 June 2021
How do you generate random Password?
Author June 21, 2021 Python No comments
How do you reverse the string without take another string?
Author June 21, 2021 Python No comments
Sunday, 20 June 2021
INDEXING & SLICING DATAFRAMES IN PANDAS [PART 3]- PYTHON PROGRAMMING
Author June 20, 2021 Python No comments
INDEXING & SLICING DATAFRAMES IN PANDAS [PART 2]- PYTHON PROGRAMMING
Author June 20, 2021 Python No comments
INDEXING & SLICING DATAFRAMES IN PANDAS [PART 1]- PYTHON PROGRAMMING
Author June 20, 2021 Python No comments
Popular Posts
-
๐งญ Introduction In the 21st century, data has become one of the most valuable resources, influencing decisions in science, business, heal...
-
Explanation: ๐น Line 1: Creating the List x = [1, 2, 3] A list named x is created. It contains three elements: Index 0 → 1 Index 1 → 2 Ind...
-
Explanation: ๐ง 1. List Creation x = [1,2,3] Here, a list named x is created with elements: Index 0 → 1 Index 1 → 2 Index 2 → 3 ๐ So the li...
-
Explanation: ๐น Step 1: Understand Boolean Values in Python In Python, booleans are treated like integers: True = 1 False = 0 ๐น Step 2: R...
-
Deep learning is at the heart of modern Artificial Intelligence — powering technologies like chatbots, recommendation systems, image recog...
-
๐ Day 34/150 – Armstrong Number in Python An Armstrong number is a number that is equal to the sum of its own digits raised to the power...
-
Explanation: ๐น Step 1: Create List x = [1,2,3] A list x is created ๐ Values inside list: 1, 2, 3 ๐น Step 2: Understand sum() Function su...
-
Explanation: ๐น Step 1: Create Tuple x = (1,[2,3]) x is a tuple (immutable) Inside tuple: 1 → integer [2,3] → mutable list ๐น Step 2: Appl...
-
๐ Day 35/150 – Count Digits in a Number in Python Counting digits means finding how many digits are present in a number. Examples: 12345 ...
-
๐ Day 37/150 – Multiplication Table in Python A multiplication table shows the result of multiplying a number with a series of numbers. ...
























