Posts

Showing posts from April, 2024

To do list make using python.

                                      Welcome to    To do list This is simple todo list for making using python. class TodoList: def __init__ ( self ): self .tasks = [] def add_task ( self , task): self .tasks.append(task) print ( "Task added successfully!" ) def delete_task ( self , task_index): if task_index < len ( self .tasks): del self .tasks[task_index] print ( "Task deleted successfully!" ) else : print ( "Invalid task index!" ) def display_tasks ( self ): if self .tasks: print ( "Your Tasks:" ) for index, task in enumerate ( self .tasks): print ( f" { index + 1 } . { task } " ) else : print ( "No tasks to display." ) def main (): todo_list = TodoList() while True : print ( " \n 1. Add Task \n 2. Dele...

This is kg to pound or pound to kg.

            Welcome to kg to pound and pound to kg This is a kg to lbs and lbs to kg. weight = float ( input ( "Enter you weight: " )) unit= input ( 'kilograms or Pound? (K or L): ' ) if unit.upper() == "K" : weight =weight* 2.205 unit= "Lbs." print ( f"Your weight is: { round (weight, 1 ) } { unit } " ) elif unit.upper()== "L" : weight = weight / 2.205 unit= "Kgs." print ( f"Your weight is: { round (weight, 1 ) } { unit } " ) else : print ( f" { unit } was not vaild." )

User text search.

                                        Welcome to text search This is search  text to user . import webbrowser print ( "This is a search bar using python." ) user = input ( "Enter what you search in google. : " ) url = f"https://www.google.com/search?q= { user } &oq=car&gs_lcrp=EgZjaHJvbWUqDggAEEUYJxg7GIAEGIoFMg4IABBFGCcYOxiABBiKBTIGCAEQRRg7Mg0IAhAAGIMBGLEDGIAEMgYIAxBFGDwyBggEEEUYPDIGCAUQRRg8MgYIBhBFGDwyBggHEEUYQdIBCDE1NDRqMGoxqAIIsAIB&sourceid=chrome&ie=UTF-8" webbrowser.open(url)

New heart shape deign using turtle

             Welcome to new heart shape  This is a new heart shape deign using turtle in python. import math from turtle import * def herata(k): return 15*math.sin(k)**3 def heartb(k): return 12*math.cos(k)-5*\ math.cos(2*k)-2*\ math.cos(3*k)-\ math.cos(4*k) speed(1000) bgcolor("black") for i in range(6000): goto(herata(i)*20,heartb(i)*20) for j in range(5): color('#f73487') goto(0,0) done()

Simple flower shape using turtle

           Welcome to make flower shape This is a simple flower shape using turtle in python from turtle import * import colorsys speed(0) bgcolor('black') h=0 for i in range(16): for j in range(18): c= colorsys.hsv_to_rgb(h,1,1) color(c) h += 0.005 rt(90) circle(150 - j *6,90) lt(90) circle(150 - j *6 , 90) rt(180) circle(40,24) done()

Basic design using turtle

         Welcome to make basic desgin This is basic desgin using turtle in python. import turtle t =turtle.Turtle() s=turtle.Screen() s.bgcolor('black') t.width(1) t.speed(25) col=('magenta','yellow','green') for i in range(500): t.pencolor(col[i%3]) t.forward(i*4) t.right(121) done()

Design make using turtle

                 Welcome to make design  This is make design using turtle in python. from turtle import * from colorsys import * bgcolor('black') tracer(100) pensize(3) h=0 def draw(ang,n): circle(5+n,69) left(ang) circle(5+2*n,60) goto(0,0) for i in range(500): c=hsv_to_rgb(h,1,1) h+=0.005 color(c) up() draw(90,i) draw(180,i) down() draw(1/2, i-i) draw(180, i/2) draw(120, i-i)

Mouse any location show

           Welcome to mouse location show. This is mouse location show using python code and it is also use in other things like auto clicker in mouse etc. import pyautogui a=pyautogui.mouseInfo() print (a)

All pdf marge in one PDF.

            Welcome to all PDF in one PDF. This is all PDF in one PDF marge using python.   import PyPDF2 from PyPDF2 import PdfWriter import os merger = PdfWriter() files = [file for file in os.listdir() if file.endswith( ".pdf" )] for pdf in files: merger.append(pdf) merger.write( "merged-pdf.pdf" ) merger.close()

This is a screen rotation code.

             Welcome to screen rotation code.  This is screen rotation code using python.    You can import ( rotate-screen ) . some time it is not work because this is computer harmful category.      ! import time import rotatescreen as rs pd = rs.get_primary_display() angle_list = [ 90 , 180 , 270 , 0 ] for i in range ( 0 , 1 ): for i in angle_list: pd.rotate_to(i) time.sleep( 0.5 )

Auto worker

                     Welcome to auto worker. This is an auto worker using by python you can changes in code your according. What you want to do.       you can change the speed change 0 in last increase go to slow. import pyautogui import time pyautogui.hotkey( 'win' , 'd' ) # kya press kar wana hai time.sleep( 1 ) pyautogui.hotkey( 'win' ) # us ke bad kya hoga time.sleep( 1 ) pyautogui.write( 'notepad' ) #next time.sleep( 2 ) pyautogui.press( 'enter' ) #next adding more your according. time.sleep( 1 ) for char in r'''what you write to any hare''' : pyautogui.typewrite(char, interval = 0 ) # Adjust the interval as needed

Style S code with turtle.

               Welcome to style S  make. This is a make stylish code with the help of python turtle. import turtle t = turtle.Turtle() t.color( 'dark blue' ) t.width( 3 ) t.speed( 'fastest' ) #Draw S t.penup() t.goto(- 161 , 44 ) t.pendown() t.setheading(- 40 ) t.circle( 12 , 270 ) t.penup() t.goto(- 60 , 45 ) t.pendown() t.right( 139 ) t.forward( 5 ) t.circle( 15 , 180 ) t.forward( 5 ) t.penup() t.goto( 17 , 66 ) t.pendown() t.setheading( 150 ) t.circle( 12 , 250 ) t.penup() t.goto(- 160 , - 45 ) t.pendown() #Draw S t.setheading(- 40 ) t.circle( 12 , 270 ) t.penup() t.goto(- 87 , - 25 ) t.pendown() t.right(- 45 ) t.forward( 5 ) t.circle( 15 , 180 ) t.forward( 5 ) t.penup() t.goto( 15 ,- 25 ) t.pendown() t.setheading( 150 ) t.circle( 12 , 250 ) t.penup() t.goto(- 60 , 45 ) t.pendown() t.right( 80 ) for _ in range ( 0 , 87 ): t.left( 0.9 ) t.forward( 1 ) for _ in range ( 0 , 3 ): t.right(- 45 ) t.forward( 1 ) t.penup() t.goto(-...