From 9f588bfe49ce7c6263d54fdf22c419df5f6b7624 Mon Sep 17 00:00:00 2001 From: Deepesh saraswat <100144204+deepeshsaraswat@users.noreply.github.com> Date: Tue, 31 May 2022 18:31:44 +0530 Subject: [PATCH] Add files via upload --- 1.py | 32 ++++++++++++ PYTHON PROGRAMS.docx | Bin 0 -> 16930 bytes Total number of notes in amount.py | 46 ++++++++++++++++++ area_of_scalen_triangle.py | 9 ++++ avg.py | 7 +++ body mass.py | 5 ++ cal.py | 5 ++ calender.py | 3 ++ check even_odd_using_lambda.py | 7 +++ check last digit binary.py | 5 ++ convert list item in upperrcase.py | 6 +++ cricket.py | 3 ++ currency_notes.py | 13 +++++ distance between two co-ordinate.py | 7 +++ distance.py | 3 ++ even numbers in list.py | 6 +++ fabonacci_fun.py | 7 +++ fabonaci.py | 9 ++++ field project.py | 23 +++++++++ filter even.py | 8 +++ filter positive from list.py | 16 ++++++ find factorial.py | 7 +++ find maximum of three nmumbers.py | 11 +++++ find_palindromme.py | 3 ++ generators.py | 11 +++++ global_local_nonlocal_variable.py | 25 ++++++++++ hamming.py | 17 +++++++ height.py | 6 +++ hypotenure.py | 5 ++ if_else_11.py | 16 ++++++ if_else_12.py | 7 +++ if_else_2.py | 6 +++ if_else_3.py | 7 +++ if_else_9.py | 6 +++ import module_own.py | 8 +++ lambda function to find the bigger.py | 4 ++ multiply with 32.py | 4 ++ multiply with 33.py | 5 ++ name space_unlimited.py | 20 ++++++++ name_space.py | 8 +++ neon.py | 15 ++++++ palindrome_string.py | 9 ++++ perfect no function.py | 12 +++++ print_multiplication_table.py | 7 +++ rabit.py | 7 +++ rectangular_tiles.py | 8 +++ recursion.py | 19 ++++++++ reduce_lambda.py | 3 ++ remove _specified_words.py | 4 ++ ...square of element in list using lambda.py | 3 ++ return square of element in list.py | 5 ++ return unique list elements.py | 14 ++++++ return_multiple.py | 13 +++++ reverse 3 digit number.py | 15 ++++++ reverse.py | 15 ++++++ reversed_words.py | 10 ++++ root.py | 7 +++ simple intrest and compound intrest.py | 7 +++ student_grade.py | 19 ++++++++ sum of all elements of list.py | 11 +++++ sum of last 3 digit.py | 9 ++++ tower of hanoi.py | 9 ++++ triangle_checking_if_else12.py | 22 +++++++++ try7.py | 9 ++++ two_wheeler_four_wheeler.py | 6 +++ voice.py | 5 ++ vol.py | 4 ++ whatsapp.py | 2 + 68 files changed, 665 insertions(+) create mode 100644 1.py create mode 100644 PYTHON PROGRAMS.docx create mode 100644 Total number of notes in amount.py create mode 100644 area_of_scalen_triangle.py create mode 100644 avg.py create mode 100644 body mass.py create mode 100644 cal.py create mode 100644 calender.py create mode 100644 check even_odd_using_lambda.py create mode 100644 check last digit binary.py create mode 100644 convert list item in upperrcase.py create mode 100644 cricket.py create mode 100644 currency_notes.py create mode 100644 distance between two co-ordinate.py create mode 100644 distance.py create mode 100644 even numbers in list.py create mode 100644 fabonacci_fun.py create mode 100644 fabonaci.py create mode 100644 field project.py create mode 100644 filter even.py create mode 100644 filter positive from list.py create mode 100644 find factorial.py create mode 100644 find maximum of three nmumbers.py create mode 100644 find_palindromme.py create mode 100644 generators.py create mode 100644 global_local_nonlocal_variable.py create mode 100644 hamming.py create mode 100644 height.py create mode 100644 hypotenure.py create mode 100644 if_else_11.py create mode 100644 if_else_12.py create mode 100644 if_else_2.py create mode 100644 if_else_3.py create mode 100644 if_else_9.py create mode 100644 import module_own.py create mode 100644 lambda function to find the bigger.py create mode 100644 multiply with 32.py create mode 100644 multiply with 33.py create mode 100644 name space_unlimited.py create mode 100644 name_space.py create mode 100644 neon.py create mode 100644 palindrome_string.py create mode 100644 perfect no function.py create mode 100644 print_multiplication_table.py create mode 100644 rabit.py create mode 100644 rectangular_tiles.py create mode 100644 recursion.py create mode 100644 reduce_lambda.py create mode 100644 remove _specified_words.py create mode 100644 return square of element in list using lambda.py create mode 100644 return square of element in list.py create mode 100644 return unique list elements.py create mode 100644 return_multiple.py create mode 100644 reverse 3 digit number.py create mode 100644 reverse.py create mode 100644 reversed_words.py create mode 100644 root.py create mode 100644 simple intrest and compound intrest.py create mode 100644 student_grade.py create mode 100644 sum of all elements of list.py create mode 100644 sum of last 3 digit.py create mode 100644 tower of hanoi.py create mode 100644 triangle_checking_if_else12.py create mode 100644 try7.py create mode 100644 two_wheeler_four_wheeler.py create mode 100644 voice.py create mode 100644 vol.py create mode 100644 whatsapp.py diff --git a/1.py b/1.py new file mode 100644 index 0000000..6db9202 --- /dev/null +++ b/1.py @@ -0,0 +1,32 @@ +from tkinter import* +from tkinter import filedialog +import pyttsx3 +import PyPDF2 +Window=Tk() +Window.geometry('500x350') +Window.config(bg="orange") +Window.title("Convert PDF File Text to Audio Speech Using Python by Our Team") +startingpagenumber = Entry(Window) +page1.place(relx=0.02,rely=0.1) +startingpagenumber.place(relx=0.6,rely=0.1) +page1=Label(Window,text=1) +label = Label(Window, text="select a book.") +label.place(relx=0.3,rely=0.2) + +def file(): + path = filedialog.askopenfilename() + book = open(path, 'rb') + pdfreader = PyPDF2.PdfFileReader(book) + pages = pdfreader.numPages + speaker = pyttsx3.init() + + for i in range(int(startingpagenumber.get()), pages): + page = pdfreader.getPage(i) + txt = page.extractText() + speaker.say(txt) + speaker.runAndWait() + +B=Button(Window, text="Choose the Book", command=file) +B.place(relx=0.4,rely=0.3) + +mainloop() \ No newline at end of file diff --git a/PYTHON PROGRAMS.docx b/PYTHON PROGRAMS.docx new file mode 100644 index 0000000000000000000000000000000000000000..33b517c00a090c8bbb620d9e482ef0f430e03b84 GIT binary patch literal 16930 zcmeIZgP$eIwl=)Ww%KLd)uryTZQHiHY@6L>ciFaW+h&)mzM45_?#!7p@AnVfoBOvT zBQxSz8JW3a#mXmE$Vz~Kq5{AHkN^OH5Wo~`qhbsM0OW%K04M-RU=0BqYeyq%M;%2s zTO$W8I#(-8f*ep_iYx%|NB#fX{ue)i+Jq7F9tK3A`@lEw4nG6rg1?ax?tVR389QREg2bB%k}S5cs{ru`Zvr zFMK5~kQ);Um;K=&=w(9##gRV5?7?%*txS$@m%6!vvk$9gk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9xKVPxxojf5ZP{mhJEOzf|2FZm5?~+d1pvT){D3|* L6y`UN1@Qj?h9Uo+ literal 0 HcmV?d00001 diff --git a/Total number of notes in amount.py b/Total number of notes in amount.py new file mode 100644 index 0000000..fc8e3e8 --- /dev/null +++ b/Total number of notes in amount.py @@ -0,0 +1,46 @@ +a=int(input("Enter the amount : ")) +n2000=n500=n200=n100=n50=n20=n10=n5=n2=n1=0 +if(a>=2000): + n2000=a//2000 + a=a-n2000*2000 +if(a>=500): + n500=a//500 + a=a-n500*500 +if(a>=200): + n200=a//200 + a=a-n200*200 +if(a>=100): + n100=a//100 + a=a-n100*100 +if(a>=50): + n50=a//50 + a=a-n50*50 +if(a>=20): + n20=a//20 + a=a-n20*20 +if(a>=10): + n10=a//10 + a=a-n10*10 +if(a>=5): + n5=a//5 + a=a-n5*5 +if(a>=2): + n2=a//2 + a=a-n2*2 +if(a>=1): + n1=a//1 + a=a-n1*1 +print("Noes of 2000 = ",n2000) +print("Noes of 500 = ",n500) +print("Noes of 200 = ",n200) +print("Noes of 100 = ",n100) +print("Noes of 50 = ",n50) +print("Noes of 20 = ",n20) +print("Noes of 10 = ",n10) +print("Noes of 5 = ",n5) +print("Noes of 2 = ",n2) +print("Noes of 1 = ",n1) + + + + diff --git a/area_of_scalen_triangle.py b/area_of_scalen_triangle.py new file mode 100644 index 0000000..4aaa9c1 --- /dev/null +++ b/area_of_scalen_triangle.py @@ -0,0 +1,9 @@ +# write a program to find the area of the triangle +# by using heron's formula +a1=int(input("Enter the side 1 : ")) +a3=int(input("Enter the side 3 : ")) +a2=int(input("Enter the side 2 : ")) +# first we find semi parimeter +s=(a1+a2+a3)/2 +area=(s*(s-a1)*(s-a2)*(s-a3))**0.5 +print("Area of the scalen triangle is %d unit^2"%area) \ No newline at end of file diff --git a/avg.py b/avg.py new file mode 100644 index 0000000..71dd42c --- /dev/null +++ b/avg.py @@ -0,0 +1,7 @@ +a=85 +b=68 +c=59 +d=78 +e=(82*500/100)-(a+b+c+d) +print(e) + diff --git a/body mass.py b/body mass.py new file mode 100644 index 0000000..40935e2 --- /dev/null +++ b/body mass.py @@ -0,0 +1,5 @@ +# write a program to find BMII(body mass index) ? +h=int(input("Enter your height in meter :")) +w=int(input("Enter your weight in kg :")) +bmi=w/(h**2) +print("Your body mass is",bmi) \ No newline at end of file diff --git a/cal.py b/cal.py new file mode 100644 index 0000000..17e26c0 --- /dev/null +++ b/cal.py @@ -0,0 +1,5 @@ +a=input("enter a string") +b=input("enter 2 string") +c=a+b +print(c) + diff --git a/calender.py b/calender.py new file mode 100644 index 0000000..c3d0298 --- /dev/null +++ b/calender.py @@ -0,0 +1,3 @@ +from calendar import* +year=int(input("Enter year:")) +print(calendar(year)) \ No newline at end of file diff --git a/check even_odd_using_lambda.py b/check even_odd_using_lambda.py new file mode 100644 index 0000000..d1f5846 --- /dev/null +++ b/check even_odd_using_lambda.py @@ -0,0 +1,7 @@ +f=lambda a:True if a%2==0 else False +n=int(input("Enter the number to check :")) +b=f(n) +if(b==True): + print("It is even number") +else: + print("Not even") \ No newline at end of file diff --git a/check last digit binary.py b/check last digit binary.py new file mode 100644 index 0000000..85872b6 --- /dev/null +++ b/check last digit binary.py @@ -0,0 +1,5 @@ +# write a python program to check wether last digit is binary or not +a=int(input("Enter the number that you want to check : ")) +n=a%10 +b=n&1 +print("Last binary digit is ",b) \ No newline at end of file diff --git a/convert list item in upperrcase.py b/convert list item in upperrcase.py new file mode 100644 index 0000000..147b433 --- /dev/null +++ b/convert list item in upperrcase.py @@ -0,0 +1,6 @@ +# sample input=['kanishk', 'ritik', 'rahul', 'govind', 'dev'] +# sample output+=['KANISHK', 'RITIK', 'RAHUL', 'GOVIND', 'DEV'] +a=input("Enter string with space:").split() +print(a) +lst=list(map(lambda x:x.upper(), a)) +print(lst) \ No newline at end of file diff --git a/cricket.py b/cricket.py new file mode 100644 index 0000000..3b2bdca --- /dev/null +++ b/cricket.py @@ -0,0 +1,3 @@ +o=int(input("Enter the number of overs :")) +run=(o-1)*33+36 +print("Total run score by player in %d overs is %d"%(o,run)) \ No newline at end of file diff --git a/currency_notes.py b/currency_notes.py new file mode 100644 index 0000000..e41c033 --- /dev/null +++ b/currency_notes.py @@ -0,0 +1,13 @@ +a=int(input("Enter the money to be withdrawn : ")) +ahundred=1 +a=a-100 +twothousand=a//2000 +rem=a%2000 +fivehundred=rem//500 +r=rem%500 +hundred=r//100 + + +print("Number of 2000 notes : ",twothousand) +print("Number of 500 notes : ",fivehundred) +print("Number of hundred notes : ",ahundred+hundred) \ No newline at end of file diff --git a/distance between two co-ordinate.py b/distance between two co-ordinate.py new file mode 100644 index 0000000..bd7ba71 --- /dev/null +++ b/distance between two co-ordinate.py @@ -0,0 +1,7 @@ +# write a program to find the distance between two co-ordinate +a1=int(input("Enter a1 : ")) +a2=int(input("Enter a2 : ")) +b1=int(input("Enter b1 : ")) +b2=int(input("Enter b2 : ")) +d=(((a2-a1)**2)+((b2-b1)**2))**0.5 +print("Distance between two points is ",d) diff --git a/distance.py b/distance.py new file mode 100644 index 0000000..43bc2c6 --- /dev/null +++ b/distance.py @@ -0,0 +1,3 @@ +d=int(input("Enter distance in meters :")) +d=d//1000 +print("Distance in kilometers is ",d) \ No newline at end of file diff --git a/even numbers in list.py b/even numbers in list.py new file mode 100644 index 0000000..3abc999 --- /dev/null +++ b/even numbers in list.py @@ -0,0 +1,6 @@ +lst=[10,20,23,24,25,26] +a=list(filter(lambda x:(x%2==0),lst)) +print(a) + + + diff --git a/fabonacci_fun.py b/fabonacci_fun.py new file mode 100644 index 0000000..fda770d --- /dev/null +++ b/fabonacci_fun.py @@ -0,0 +1,7 @@ +def fun(x): + a,b=0,1 + for i in range(x): + print(a) + a,b=b,a+b +n=int(input("Enter the number of terms :")) +fun(n) \ No newline at end of file diff --git a/fabonaci.py b/fabonaci.py new file mode 100644 index 0000000..6546e1c --- /dev/null +++ b/fabonaci.py @@ -0,0 +1,9 @@ +l=int(input("Enter the number of terms:")) + +y=lambda x,y:x+y + +a,b=0,1 +for i in range (l): + c=y(a,b) + print(a,end=" ") + a,b=b,c \ No newline at end of file diff --git a/field project.py b/field project.py new file mode 100644 index 0000000..3a4e325 --- /dev/null +++ b/field project.py @@ -0,0 +1,23 @@ +# importing the modules +from http.cookies import BaseCookie +import PyPDF2 +import pyttsx3 + +# path of the PDF file +path = open('C:\\Users\\kanis\\OneDrive\\Desktop\\Fitting Shop.pdf', 'rb') + +# creating a PdfFileReader object +pdfReader = PyPDF2.PdfFileReader(path) + +# the page with which you want to start +# this will read the page of 25th page. +from_page = pdfReader.getPage(1) + +# extracting the text from the PDF +text = from_page.extractText() + + +# reading the text +speak = pyttsx3.init() +speak.say(text) +speak.runAndWait() diff --git a/filter even.py b/filter even.py new file mode 100644 index 0000000..fc67b22 --- /dev/null +++ b/filter even.py @@ -0,0 +1,8 @@ +def even(n): + if(n%2==0): + return True + else: + return False +lst=[2,3,4,5,6,7,8] +a=list(filter((even),lst)) +print(a) \ No newline at end of file diff --git a/filter positive from list.py b/filter positive from list.py new file mode 100644 index 0000000..89c5157 --- /dev/null +++ b/filter positive from list.py @@ -0,0 +1,16 @@ +lst=list(map(int,input("Enter the element of list with a space").split())) +print(lst) + +#by using lambda +# lst2=list(filter(lambda x:x>0 ,lst)) +#print(lst2) + +#without using lambda +def abc(a): + if(a>0): + return True + else: + return False + +lst2=list(filter(abc,lst)) +print(lst2) \ No newline at end of file diff --git a/find factorial.py b/find factorial.py new file mode 100644 index 0000000..4282c6f --- /dev/null +++ b/find factorial.py @@ -0,0 +1,7 @@ +def fact(a): + fact=1 + for i in range(a,0,-1): + fact*=i + return fact +n=int(input("Enter the number to find factorial")) +print("factorial is ",fact(n)) diff --git a/find maximum of three nmumbers.py b/find maximum of three nmumbers.py new file mode 100644 index 0000000..26be246 --- /dev/null +++ b/find maximum of three nmumbers.py @@ -0,0 +1,11 @@ +def num(a,b,c): + if((a>b) and (a>c)): + return(a) + elif((b>c) and (b>a)): + return(b) + else: + return(c) +a1=int(input("Enter 1 no:")) +a2=int(input("Enter 2 no:")) +a3=int(input("Enter 3 no:")) +print("maxim no is",num(a1,a2,a3)) diff --git a/find_palindromme.py b/find_palindromme.py new file mode 100644 index 0000000..3ddebb0 --- /dev/null +++ b/find_palindromme.py @@ -0,0 +1,3 @@ +lst=['php','w3r','mom','sas','ass'] +a=list(filter(lambda x: x==x[-1: :-1],lst)) +print(a) \ No newline at end of file diff --git a/generators.py b/generators.py new file mode 100644 index 0000000..51efd68 --- /dev/null +++ b/generators.py @@ -0,0 +1,11 @@ +def mygen(x,y): + while(x= 'A' and n<='Z') or (n>='a' and n<='z'): + print(n," is a character ") +else: + print(n," is not character : ") \ No newline at end of file diff --git a/import module_own.py b/import module_own.py new file mode 100644 index 0000000..59f4eff --- /dev/null +++ b/import module_own.py @@ -0,0 +1,8 @@ +# type 1 +import reversed_words +a=input("Enter the word to reverse") +print(reversed_words.reverse(a)) +# type 2 +'''from reversed_words import* +a=input("Enter the sentence:") +print(reverse(a))''' \ No newline at end of file diff --git a/lambda function to find the bigger.py b/lambda function to find the bigger.py new file mode 100644 index 0000000..d9a01a1 --- /dev/null +++ b/lambda function to find the bigger.py @@ -0,0 +1,4 @@ +a=lambda x,y:x if (x>y) else y +a1=int(input("Enter no1:")) +a2=int(input("Enter no2:")) +print("max is ",a(a1,a2)) \ No newline at end of file diff --git a/multiply with 32.py b/multiply with 32.py new file mode 100644 index 0000000..41a8674 --- /dev/null +++ b/multiply with 32.py @@ -0,0 +1,4 @@ +# write a program to multiply a number by 32 +a=int(input("Enter the number that you want to multiply: ")) +mult=a<<5 +print("%d multiply by %d is %d"%(a,32,mult)) \ No newline at end of file diff --git a/multiply with 33.py b/multiply with 33.py new file mode 100644 index 0000000..4b446d0 --- /dev/null +++ b/multiply with 33.py @@ -0,0 +1,5 @@ +# write a program to multiply a number by 33 +a=int(input("Enter the number that you want to multiply: ")) +b=a<<5 +mult=a+b +print("%d multiply by %d is %d"%(a,33,mult)) \ No newline at end of file diff --git a/name space_unlimited.py b/name space_unlimited.py new file mode 100644 index 0000000..dad0b53 --- /dev/null +++ b/name space_unlimited.py @@ -0,0 +1,20 @@ +def name(n): + sum=0 + n=" "+n + for i in range(len(n)): + if(n[i]==" "): + sum+=1 + print(sum) + temp=0 + for i in range(len(n)): + if((n[i]==" ") and temp!=(sum-1)): + a=n[i+1] + print(a,end=""+" ") + temp+=1 + elif((n[i]==" ") and temp==(sum-1)): + b=n[i:len(n)] + temp+=1 + print(b,end="") + +a=input("Enter the name :") +name(a) \ No newline at end of file diff --git a/name_space.py b/name_space.py new file mode 100644 index 0000000..c3631c3 --- /dev/null +++ b/name_space.py @@ -0,0 +1,8 @@ +def name(a): + for i in range(len(a)): + if(a[i]==' '): + n=a[i:] + print(a[0]+' '+n) + +a=input("Enter your name:") +name(a) \ No newline at end of file diff --git a/neon.py b/neon.py new file mode 100644 index 0000000..9c868ef --- /dev/null +++ b/neon.py @@ -0,0 +1,15 @@ +def neon(n): + sq=n**2 + sum=0 + while(sq!=0): + sumsq=sq%10 + sum+=sumsq + sq=sq//10 + if(sum==n): + print("number",n,"is neon number") + else: + print("number is not neon") + + +n=int(input("Enter any number : ")) +neon(n) \ No newline at end of file diff --git a/palindrome_string.py b/palindrome_string.py new file mode 100644 index 0000000..4aac06d --- /dev/null +++ b/palindrome_string.py @@ -0,0 +1,9 @@ +def fun(x): + a=x[-1: :-1] + if(a==x): + print("String is palindrome") + else: + print("String is not palindrome") + +n=input("Input the string :") +fun(n) \ No newline at end of file diff --git a/perfect no function.py b/perfect no function.py new file mode 100644 index 0000000..5656d7e --- /dev/null +++ b/perfect no function.py @@ -0,0 +1,12 @@ +def per(n): + suma=0 + for i in range(1,n): + if(n%i==0): + suma+=i + if(suma==n): + print("No is perfect:") + else: + print("No is not perfect :") +x=int(input("Enter the number that you want to check")) +per(x) + diff --git a/print_multiplication_table.py b/print_multiplication_table.py new file mode 100644 index 0000000..861360b --- /dev/null +++ b/print_multiplication_table.py @@ -0,0 +1,7 @@ +from tkinter import Y + + +n=int(input("Enter the number")) +l=lambda x,y:(x*y) +for i in range(1,11): + print(l(n,i)) \ No newline at end of file diff --git a/rabit.py b/rabit.py new file mode 100644 index 0000000..2856c23 --- /dev/null +++ b/rabit.py @@ -0,0 +1,7 @@ +#write a program to find the number of rabits and cock given the number of head and number of leg +head=int(input("Enter the total no of head : ")) +leg=int(input("Enter the total no of legs : ")) +rabbit=(leg//2-head) +cock=2*head-(leg//2) +print("no of rabbit : ",rabbit) +print("Total no of cock : ",cock) \ No newline at end of file diff --git a/rectangular_tiles.py b/rectangular_tiles.py new file mode 100644 index 0000000..43586e3 --- /dev/null +++ b/rectangular_tiles.py @@ -0,0 +1,8 @@ +len1=int(input("Enter the length of the floor in cm : ")) +br1=int(input("Enter the breadth of the floorin cm : ")) +len2=int(input("Enter the length of the tilesin cm : ")) +br2=int(input("Enter the breadth of the tilesin cm : ")) +a1=len1*br1 +a2=len2*br2 +n=a1/a2 +print("No of tiles required ",n) \ No newline at end of file diff --git a/recursion.py b/recursion.py new file mode 100644 index 0000000..1e7d5ee --- /dev/null +++ b/recursion.py @@ -0,0 +1,19 @@ +'''i=0 +def name(): + global i # to take global value to know how many times this code will execute + i+=1 + print("kanishk",i) # this wil print around 1000 times name + name() + +name() ''' + +import sys +sys.setrecursionlimit(2000) # now this will print 2000 times after that it will give error +i=0 +def name(): + global i # to take global value to know how many times this code will execute + i+=1 + print("kanishk",i) # this wil print around 2000 times name + name() + +name() \ No newline at end of file diff --git a/reduce_lambda.py b/reduce_lambda.py new file mode 100644 index 0000000..5b508a9 --- /dev/null +++ b/reduce_lambda.py @@ -0,0 +1,3 @@ +a=[1,2,3,4] +b=list(map(lambda x:x*x ,a)) +print(b) \ No newline at end of file diff --git a/remove _specified_words.py b/remove _specified_words.py new file mode 100644 index 0000000..a53d340 --- /dev/null +++ b/remove _specified_words.py @@ -0,0 +1,4 @@ +a=["red","orange","yellow","green","white","black"] +b=["red","yellow"] #remove these words from list a +y=list(filter(lambda a:a not in b ,a)) +print(y) \ No newline at end of file diff --git a/return square of element in list using lambda.py b/return square of element in list using lambda.py new file mode 100644 index 0000000..61668f9 --- /dev/null +++ b/return square of element in list using lambda.py @@ -0,0 +1,3 @@ +lst=[2,2,3,4] +a=list(map(lambda x:x*x,lst)) +print(a) \ No newline at end of file diff --git a/return square of element in list.py b/return square of element in list.py new file mode 100644 index 0000000..34732c5 --- /dev/null +++ b/return square of element in list.py @@ -0,0 +1,5 @@ +def square(a): + return a*a +lst=[1,2,3,4,5] +a=list(map((square),lst)) +print(a) \ No newline at end of file diff --git a/return unique list elements.py b/return unique list elements.py new file mode 100644 index 0000000..dc7feda --- /dev/null +++ b/return unique list elements.py @@ -0,0 +1,14 @@ +# unique list means remove duplicate elements from the list +def lst(a): + b=[] + for i in a: + if(i not in b): + b.append(i) + return(b) + +n=int(input("Enter the number of elements:")) +b=[] +for i in range(n): + n=int(input("Enter the value:")) + b.append(n) +print("unique list is ",lst(b)) diff --git a/return_multiple.py b/return_multiple.py new file mode 100644 index 0000000..ffa5eb2 --- /dev/null +++ b/return_multiple.py @@ -0,0 +1,13 @@ +def multiple(a,b): + c=a+b + d=a-b + e=a*b + f=a//b + return c,d,e,f +x=int(input("Enter first no:")) +y=int(input("Enter the second no:")) +n,n1,n2,n3=multiple(x,y) +print(n) +print(n1) +print(n2) +print(n3) diff --git a/reverse 3 digit number.py b/reverse 3 digit number.py new file mode 100644 index 0000000..bf015d0 --- /dev/null +++ b/reverse 3 digit number.py @@ -0,0 +1,15 @@ +number=int(input("enter the number")) +a=number//100 +b=number%100 +c=b//10 +d=b%10 +print(d*100+c*10+a) + +# 2nd method +n=int(input("enter the number")) +a=n%10 +n=n//10 +b=n%10 +n=n//10 +c=n%10 +print("number in reverse is %d%d%d"%(a,b,c)) \ No newline at end of file diff --git a/reverse.py b/reverse.py new file mode 100644 index 0000000..0d51cfc --- /dev/null +++ b/reverse.py @@ -0,0 +1,15 @@ +def fun(x): + a=str(x) + rem=0 + rev=0 + sum=0 + for i in range(len(a)): + rem=x%10 + sum+=rem + rev=rev*10+rem + x=x//10 + print(rev) + print("sum of its digit is",sum) + +n=int(input("Enter the number to reverse :")) +fun(n) \ No newline at end of file diff --git a/reversed_words.py b/reversed_words.py new file mode 100644 index 0000000..03a4491 --- /dev/null +++ b/reversed_words.py @@ -0,0 +1,10 @@ +def reverse(x): + a=x.split(" ") + b=" ".join(reversed(a)) + return(b) + + +if __name__=='_main_': + n=input("Enter the words to be reversed: ") + print(reverse(n)) + diff --git a/root.py b/root.py new file mode 100644 index 0000000..86235fe --- /dev/null +++ b/root.py @@ -0,0 +1,7 @@ +a=int(input("enter value")) +b=int(input("enter value")) +c=int(input("enter value")) +d=b-(4*a*c) +root=(b*(d**1/2))/2*a +print(root) + diff --git a/simple intrest and compound intrest.py b/simple intrest and compound intrest.py new file mode 100644 index 0000000..4bb44c2 --- /dev/null +++ b/simple intrest and compound intrest.py @@ -0,0 +1,7 @@ +principal=int(input("Enter the principal amount in rs : ")) +rate=int(input("Enter the rate : ")) +time=int(input("Enter the time : ")) +si=(principal*rate*time)/100 +ci=principal*((1+rate/100)**time)-principal +print("Simple Intrest is",si) +print("Compound Intrest is",ci) diff --git a/student_grade.py b/student_grade.py new file mode 100644 index 0000000..a6af45b --- /dev/null +++ b/student_grade.py @@ -0,0 +1,19 @@ +n1=int(input("Enter the number of subject physics : ")) +n2=int(input("Enter the number of subject chemistry : ")) +n3=int(input("Enter the number of subject math : ")) +n4=int(input("Enter the number of subject Biology : ")) +n5=int(input("Enter the number of subject Computer : ")) +a=(n1+n2+n3+n4+n5)//5 +print("Percentage is ",a) +if(a>=90): + print("your grade is A") +elif(a>=80): + print("Your grade is B") +elif(a>=70): + print("Your grade is C") +elif(a>=60): + print("Your grade is D") +elif(a>=840): + print("Your grade is D") +elif(a<40): + print("your grade is F") diff --git a/sum of all elements of list.py b/sum of all elements of list.py new file mode 100644 index 0000000..8c4d2a7 --- /dev/null +++ b/sum of all elements of list.py @@ -0,0 +1,11 @@ +def lst(a): + sum=0 + for i in a : + sum+=i + return(sum) +n=int(input("Enter the number of elements:")) +b=[] +for i in range(n): + n=int(input("Enter the value:")) + b.append(n) +print("sum of all elements of this list is",lst(b)) \ No newline at end of file diff --git a/sum of last 3 digit.py b/sum of last 3 digit.py new file mode 100644 index 0000000..43fafb9 --- /dev/null +++ b/sum of last 3 digit.py @@ -0,0 +1,9 @@ +# wite a program to find the sum of last 3 digit of university roll number +n=int(input("Enter your university roll number :")) +a=n%10 +n=n//10 +b=n%10 +n=n//10 +c=n%10 +n=n//10 +print("sum of last 3 digit of your university roll no is ",a+b+c) \ No newline at end of file diff --git a/tower of hanoi.py b/tower of hanoi.py new file mode 100644 index 0000000..5142f5e --- /dev/null +++ b/tower of hanoi.py @@ -0,0 +1,9 @@ +def toh(numbers,start,aux,end): + if numbers==1: + print("Move disk 1 from rod {} to {}".format(start,end)) + return + toh(numbers-1,start,end,aux) + print("Move disk {} from rod {} to {}".format(numbers,start,end)) + toh(numbers-1,aux,start,end) +disc=3 +toh(disc,"A","B","C") \ No newline at end of file diff --git a/triangle_checking_if_else12.py b/triangle_checking_if_else12.py new file mode 100644 index 0000000..3555094 --- /dev/null +++ b/triangle_checking_if_else12.py @@ -0,0 +1,22 @@ +#2) Write a Python program to check a triangle is equilateral, isosceles or scalene + + +n1=int(input("Enter the first side : ")) +n2=int(input("Enter the second side : ")) +n3=int(input("Enter the third side : ")) + + + +if n3**2==n1**2+n2**2: + print("Triangel is right angled! ") +elif n1==n2==n3: + print("The triangle is equilateral") + +elif (n1==n2 ) or (n2==n3) or (n3==n1) : + print("The triangle is isoscales") + +elif n1!=n2!=n1: + print("The triangle is scalene") +else: + print("Invalid triange !") + diff --git a/try7.py b/try7.py new file mode 100644 index 0000000..c7bdae0 --- /dev/null +++ b/try7.py @@ -0,0 +1,9 @@ +print("In the Quadratic equation\na(x^2)+bx+c, Enter such values") +a=float(input("Enter the value of 'a' : ")) +b=float(input("Enter the value of 'b' : ")) +c=float(input("Enter the value of 'c' : ")) +d=((b*b)-(4*a*c))**(1/2) +x1=(-b+d)/(2*a) +x2=(-b-d)/(2*a) +print("roots of the equation are") +print("x=",x1," x=",x2) diff --git a/two_wheeler_four_wheeler.py b/two_wheeler_four_wheeler.py new file mode 100644 index 0000000..2ca126c --- /dev/null +++ b/two_wheeler_four_wheeler.py @@ -0,0 +1,6 @@ +v=int(input("Enter total number of vehicles :")) +w=int(input("Enter total number of wheels : ")) +fw=w//2-v +tw=v-fw +print("No of two wheelers are : ",tw) +print("No of four wheelers are : ",fw) \ No newline at end of file diff --git a/voice.py b/voice.py new file mode 100644 index 0000000..4e34ef4 --- /dev/null +++ b/voice.py @@ -0,0 +1,5 @@ +import pyttsx3 +engine = pyttsx3.init() +a=input("Enter words:") +engine.say(a) +engine.runAndWait() diff --git a/vol.py b/vol.py new file mode 100644 index 0000000..3c10772 --- /dev/null +++ b/vol.py @@ -0,0 +1,4 @@ +r=int(input("enter radius")) +h=int(input("enter hieght")) +v=3.14*(r**2)*h +print(v) diff --git a/whatsapp.py b/whatsapp.py new file mode 100644 index 0000000..87fd2aa --- /dev/null +++ b/whatsapp.py @@ -0,0 +1,2 @@ +import pywhatkit +pywhatkit.sendwhatmsg('+919140175196','good morning',1,5) \ No newline at end of file