1. Automatically display current date and time
from datetime import datetime now=datetime.now() print("Current Date & Time:" , now.strftime("%Y-%m-%d %H:%M:%S")) #source code --> clcoding.com
Output:
Current Date & Time: 2025-11-09 15:23:55
2. Generate a Random Password
import string,random chars=string.ascii_letters + string.digits+string.punctuation password=''.join(random.sample(chars,12)) print("Generated Password:",password) #source code --> clcoding.comOutput:Generated Password: /<?V1CP2{UgS3. Convert Text to speech
from gtts import gTTS from IPython.display import Audio text="python automation makes life easier" speech=gTTS(text) speech.save("speech.mp3") Audio("speech.mp3") #source code --> clcoding.comOutput:4. Plot data automatically
import matplotlib.pyplot as plt x=[1,2,3,4,5] y=[10,30,60,80,30] plt.plot(x,y,marker='o') plt.title("Quick Automation graph") plt.xlabel("day") plt.ylabel("progress") plt.show() #source code --> clcoding.comOutput:5. Auto Create a to do list CSV
from datetime import date import pandas as pd today=date.today().strftime("%Y-%m-%d") task=["check mails","work on python", "go for a walk"] df = pd.DataFrame({"Date":[today]*len(task), "Task":task, "Status":["Pending"]*len(task)}) df.to_csv(f"todo_{today}.csv",index=False) display(df) #source code --> clcoding.comOutput:
Date Task Status 0 2025-11-09 check mails Pending 1 2025-11-09 work on python Pending 2 2025-11-09 go for a walk Pending
.png)

0 Comments:
Post a Comment