Posts

Showing posts from June, 2022

Write A Python Program To Find Max Between Three Numbers.

 Write A Python Program To Find Max Between Three Numbers Enter By The User. Code: num1 = int ( input ( "Enter The First Number:" )) num2 = int ( input ( "Enter The Second Number:" )) num3 = int ( input ( "Enter The Third Number:" )) if num1 > num2 and num1 > num3 :     print ( f " { num1 } is Greatest Number" ) elif num2 > num1 and num2 > num3 :     print ( f " { num2 } is Greatest Number" ) else :     print ( f " { num3 } is Greatest Number" ) Output: Enter The First Number:47 Enter The Second Number:50 Enter The Third Number:48 50 is Greatest Number Download Code

Make A Calculator Using If else Statement in Python

 Make A Calculator Using If else Statement in Python Code - num1 = int ( input ( "Enter The First Number: " )) operator = input ( "Choose Operater +,-,*,/,%:" ) num2 = int ( input ( "Enter The Second Number: " )) if operator == "+" :     print ( "Output = " ,num1 + num2) elif operator == "-" :     print ( "Output = " ,num1 - num2) elif operator == "*" :     print ( "Output = " ,num1 * num2) elif operator == "/" :     print ( "Output = " ,num1 / num2) elif operator == "%" :     print ( "Output = " ,num1 % num2) else :     print ( "Invalid Input!" ) Output -  Enter The First Number: 47 Choose Operater +,-,*,/,%:+ Enter The Second Number: 3 Output =  50 Download Code

Write Multiplication Table Using While Loop In Python

 Write Multiplication Table Using While Loop In Python Code: Num = int ( input ( "Enter The Number :" )) i = 0 while i < 10 :     i = i + 1     print ( f " { Num } X { i } = { Num * i } " )     # or     # print(Num,"X",i,"=",Num*i)     # or     # print(str(Num) + "X" + str(i) + "=" + str(Num*i)) Output: Enter The Number:8 8X1=8 8X2=16 8X3=24 8X4=32 8X5=40 8X6=48 8X7=56 8X8=64 8X9=72 8X10=80 Download Code

Write Multiplication Table Using For Loop In Python

Write  Multiplication Table Using For Loop In Python Code: Num = int ( input ( "Enter The Number :" )) for i in range ( 1 , 11 ) :     print ( f " { Num } X { i } = { Num * i } " )     # or     # print(Num,"X",i,"=",Num*i)     # or     # print(str(Num) + "X" + str(i) + "=" + str(Num*i)) Output: Enter The Number:4 4X1=4 4X2=8 4X3=12 4X4=16 4X5=20 4X6=24 4X7=28 4X8=32 4X9=36 4X10=40 Download Code

Write a program to find out whether a given post is talking about "harry" or not using Python?

write a program to find out whether a given post is talking about harry or not? Code: post = input ( "Enter a post: " ) if 'harry' in post . lower ():     print ( "Yes! the post contains the name Harry." ) else :     print ( "No! the post does not contain the name Harry" ) Output: Enter a post: harry Yes! the post contains the name Harry. Enter a post: HARRY Yes! the post contains the name Harry. Enter a post: Harry Yes! the post contains the name Harry. Download Code

Write a Python Program To Calculate The Grade Of A Student

 Write a Python Program To Calculate the Grade Of a Student From His marks From The Following Scheme: 90-100 →Ex 80-90 → A 70-80 → B 60-70 → C 50-60 →D    <50 →F Code : marks = int ( input ( "Enter Your Marks \n " )) if marks >= 90 :     grade = "Ex" elif marks >= 80 :     grade = "A" elif marks >= 70 :     grade = "B" elif marks >= 60 :     grade = "C" elif marks >= 50 :     grade = "D" else :     grade = "F" print ( "Your grade is " + grade ) Output : Enter Your Marks 99 Your grade is Ex Enter Your Marks 50 Your grade is D Enter Your Marks 40 Your grade is F Download Code

Write A Python Program Which is Find out Whether a given name is Present in a List.

 Write A Python Program Which is Find out Whether a given name is Present in a List. Code: names = [ "Jaga" , "Bibhu" , "Nirakar" , "Subrat" , "Rama" , "Rajeeb" ] name = input ( "Enter the name to check \n " ) if name in names :     print ( "Your name is present in the list" ) else :     print ( "Your name is not present in the list" ) Output: Enter the name to check Rajeeb Your name is present in the list Enter the name to check Hari Your name is not present in the list Download Code

Write A Python Program To Find Max Between Four Numbers.

 Write A Python Program To Find Max Between Four Numbers. Code: num1 = int ( input ( "Enter  The Number 1 :" )) num2 = int ( input ( "Enter  The Number 2 :" )) num3 = int ( input ( "Enter  The Number 3 :" )) num4 = int ( input ( "Enter  The Number 4 :" )) if num1 > num4 :     f1 = num1 else :     f1 = num4 if num2 > num3 :     f2 = num2 else :     f2 = num3 if f1 > f2 :     print ( f1 , "is Greatest" ) else :     print ( f2 , "is Greatest" ) Output: Enter  The Number 1 :25 Enter  The Number 2 :26 Enter  The Number 3 :27 Enter  The Number 4 :28 28 is Greatest Download Code

Write A Python Program To Find Max Between Two Numbers.

 Write A Python Program To Find Max Between Two Numbers. Code: num1 = int ( input ( "Enter  The Number 1 :" )) num2 = int ( input ( "Enter  The Number 2 :" )) if num1 > num2 :     print ( num1 , "is Greater" ) else :     print ( num2 , "is Greater" ) Output: Enter  The Number 1 :25 Enter  The Number 2 :26 26 is Greater Enter  The Number 1 :99 Enter  The Number 2 :97 99 is Greater Download Code

Write A Python Program To Check student is Pass or Fail In Exam

 Write a Python Program To Find Out Whether a Student is pass or fails if it requires a total of 40% And at least 33 in subjects to Pass Assume 3 Subject And take Marks as an Input From the User. Code: sub1 = int ( input ( "Enter The Mark Of Subject 1 :" )) sub2 = int ( input ( "Enter The Mark Of Subject 2 :" )) sub3 = int ( input ( "Enter The Mark Of Subject 3 :" )) if sub1 < 33 or sub2 < 33 or sub3 < 33 :     print ( "Fail Due To You secured Less Then 33 Marks In Subject." ) elif (( sub1 + sub2 + sub3 ) / 3 ) < 40 :     print ( "You Are Fail Due To You Got Less Rhen 40% marks" ) else :     print ( "You Are Passed!" ) Output: Enter The Mark Of Subject 1 :25 Enter The Mark Of Subject 2 :34 Enter The Mark Of Subject 3 :55 Fail Due To You secured Less Then 33 Marks In Subject. Enter The Mark Of Subject 1 :85 Enter The Mark Of Subject 2 :99 Enter The Mark Of Subject 3 :25 Fail Due To You secured Less Th...

Write A Python Program To Check Username Is Contains Less Than is 10 Characters.

 Write A Program Whether a given Username Contains Less Than 10 Characters. Code: username = input ( "Enter The Username : " ) if ( len ( username )) < 10 :     print ( 'Username is correct ' ) else :     print ( 'Username is too long !' ) Output: Enter The Username : rajeeblochan Username is too long ! Enter The Username : rajeeb Username is correct  Download Code

Detect Spam Comments Using Python

  A spam Comment Define As Text Conating Following Keywords "make a lot of money","buynow", "Subscribe this", "click this" write A program to detect spam is Using Python Program Code: comment = input ( "Enter the comment : " ) if ( "make a lot of money" in comment ) :     spam = True elif ( "buy now" in comment ) :     spam = True elif ( "subscribe this" in comment ) :     spam = True elif ( "click this" in comment ) :     spam = True else :     spam = False if ( spam ) :     print ( "This Is a Spam Comment" ) else :     print ( "This is not a Spam Comment" ) Output: Enter the comment : buy now This Is a Spam Comment Download Code

Write A Python Program To Python Program to Check if a Number is Positive, Negative or 0

 A Python Program To Python Program to Check if a Number is Positive, Negative or 0 Code: number = int ( input ( "Enter The Number :" )) if number > 0 :     print ( number , "is Positie Number" ) elif number < 0 :     print ( number , "is Negative Number" ) else :     print ( "This Is Zeor" ) Output: Enter The Number :25 25 is Positie Number Enter The Number :-25 -25 is Negative Number Enter The Number :0 This Is Zeor Download Code

Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and User Keys as their Name Assume That The Names Are Unique.

 Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and  User Keys as their Name Assume That  The Names Are Unique. Code: FavLang = {} a = input ( "Enter your Favorite Language Raka : \n " ) b = input ( "Enter your Favorite Language Rama : \n " ) c = input ( "Enter your Favorite Language Raaj : \n " ) d = input ( "Enter your Favorite Language Raja : \n " ) FavLang [ "Raja" ] = d FavLang [ "Raka" ] = a FavLang [ "Rama" ] = b FavLang [ "Raaj" ] = c print ( FavLang ) Output: Enter your Favorite Language Raka :   Python Enter your Favorite Language Rama :   C Enter your Favorite Language Raaj :   C# Enter your Favorite Language Raja :   Java {'Raja': 'Java', 'Raka': 'Python', 'Rama': 'C', 'Raaj': 'C#'} Download Code

Write A Program To Input eight Number From The User And Display All The Unique Number (In A Set).

 Write A Program To Input eight Number From  The User  And Display All The Unique Numbers. Code : num1 = int ( input ( "Enter number 1 \n " )) num2 = int ( input ( "Enter number 2 \n " )) num3 = int ( input ( "Enter number 3 \n " )) num4 = int ( input ( "Enter number 4 \n " )) num5 = int ( input ( "Enter number 5 \n " )) num6 = int ( input ( "Enter number 6 \n " )) num7 = int ( input ( "Enter number 7 \n " )) num8 = int ( input ( "Enter number 8 \n " )) s = { num1 , num2 , num3 , num4 , num5 , num6 , num7 , num8 } print ( s ) Output: Enter number 1 25 Enter number 2 33 Enter number 3 89 Enter number 4 493 Enter number 5 25 Enter number 6 33 Enter number 7 85 Enter number 8 99 {33, 99, 493, 85, 89, 25} Download Code

Write A Program In Python To Create A dictionary Of Hindi/Odia Words With Values as Their English Meaning.

Image
 Write A Program In Python To Create A dictionary Of Hindi/Odia Words With Values as Their English Meaning, Provide the User With An Option To Look it up. Code : dictionary = {     "chasama" : "glass" ,     "kalama" : "pen" ,     "kagaj" : "paper" ,     "khata" : "note" } print ( "Option Are : " , dictionary . keys ()) a = input ( "Enter the odia/Hindi word : \n " ) print ( "English meaning is :" , dictionary [ a ]) # OR print ( "English meaning is :" , dictionary . get ( a )) Output: Download Source Code

Write A Python Program To accept the Marks Of Six Students And Display them In A Sorted Manner.

Image
 Write A Python Program To accept the Marks Of Six Students And Display them In A Sorted Manner. Code: m1 = int ( input ( "Enter Marks for Student Number 1: " )) m2 = int ( input ( "Enter Marks for Student Number 2: " )) m3 = int ( input ( "Enter Marks for Student Number 3: " )) m4 = int ( input ( "Enter Marks for Student Number 4: " )) m5 = int ( input ( "Enter Marks for Student Number 5: " )) m6 = int ( input ( "Enter Marks for Student Number 6: " )) myList = [ m1 , m2 , m3 , m4 , m5 , m6 ] myList . sort () print ( myList ) Output:   Download Source Code

Write A Python Program To Calculate sum Of A List.

Image
 Write A Python Program To Calculate the Sum of the Following List. a = [2,4,56,7] Code: a = [ 2 , 4 , 56 , 7 ] print ( a [ 0 ] + a [ 1 ] + a [ 2 ] + a [ 3 ]) # OR print ( sum ( a )) Output: 69 Download Source Code

Write The Python Program To Count The Number Of Zeroes in A a Tuple.

Image
 Write The Python Program To Count the Number Of Zeroes in the Following Tuple. t = (25,47,0,69,45,0,456,0,44,0,3) Code : t = ( 25 , 47 , 0 , 69 , 45 , 0 , 456 , 0 , 44 , 0 , 3 ) print ( t . count ( 0 )) Output: 4 Download Source Code

Write Python Program To Store Seven Fruits Name In a List Enter By The User

Image
 Write Python Program To Store Seven Fruits Name In a List Enter By The User. Code: fruit1 = input ( "Enter Fruit Number 1: " ) fruit2 = input ( "Enter Fruit Number 2: " ) fruit3 = input ( "Enter Fruit Number 3: " ) fruit4 = input ( "Enter Fruit Number 4: " ) fruit5 = input ( "Enter Fruit Number 5: " ) fruit6 = input ( "Enter Fruit Number 6: " ) fruit7 = input ( "Enter Fruit Number 7: " ) Fruits = [ fruit1 , fruit2 , fruit3 , fruit4 , fruit5 , fruit6 , fruit7 ] print ( Fruits ) Output: Download Source Code

Write A Python Program To Detect DoubleSpace In A String Enter By The User.

Image
Write A  Python Program To Detect DoubleSpace In A String Enter By The User. Code : Str = input ( "Enter The Text : \n " ) doubleSpaces = Str . find ( "  " ) print ( doubleSpaces ) Output : Download Source Code

Write A Python Program To Fill A Letter Template?

Image
  Write A Python Program To Fill A Letter Template Given Below With Name And Date. Letter :  Dear <|NAME|>, Greetings from ABC coding house. I am happy to tell you about your selection Congratulation You are selected! Date: <|DATE|>                        Code: letter = '''Dear <|NAME|>, Greetings from ABC coding house. I am happy to tell you about your selection Congratulation You are selected! Date: <|DATE|> ''' name = input ( "Enter Your Name \n " ) date = input ( "Enter Date \n " ) letter = letter . replace ( "<|NAME|>" , name ) letter = letter . replace ( "<|DATE|>" , date ) print ( letter ) Output: Download Source Code

Write A Python Program to Calculate The Square Of A Number Entered By The user?

Image
 Write A Python Program to Calculate the Square Of A Number Entered By The user? Code: num = int ( input ( "Enter The Number :" )) Square = ( num ** 2 ) print ( "The Square Of The " , num , "is :" , Square ) Output: Download Source Code

Write A Python Program To Find Average Of Two Numbers Enter By The User?

Image
 Write A Python Program To Find Average Of Two Numbers Enter By The User?  Code: num1 = int ( input ( "Enter The Number 1 :" )) num2 = int ( input ( "Enter The Number 2 :" )) average = (( num1 + num2 ) / 2 ) print ( "The average of Number1 and Number2 is :" , average ) Output: Download Source Code

Write Python Programme To Take Two Numbers Input From User And Find Remainder Between Them?

Image
 Write Python Programme To Take Two Numbers Input From User And Find Remainder Between Number1 and Number2?    Code: num1 = int ( input ( "Enter The Number 1 :" )) num2 = int ( input ( "Enter The Number 2 :" )) print ( "The remainder when Number1 is divided by Number2 is : " , num1 % num2 ) Output: Download Source Code

Write A Programme In Python To Print Twinkle-Twinkle Little Star Poem?

Image
 Write A  Programme In Python To Print Twinkle-Twinkle Little Star Poem?  Code: print ( '''Twinkle, twinkle, little star How I wonder what you are Up above the world so high Like a diamond in the sky''' ) Output : Download Source Code

Write a Programme In python Take 2 Number Input From User And Print Sum Of Those Numbers?

Image
 Write a Programme In python Take 2 Number  Input From User And Print Sum Of Those Numbers?   Code : num1 = int ( input ( "Enter The Number 1 :" )) num2 = int ( input ( "Enter The Number 2 :" )) print ( "The Sum Of Number1 And Number2 is :" , num1 + num2 ) Output : Download Source Code

Write A Programme In Python To Take Name as Input From User And Say Hello To him?

Image
 Write A Programme In Python To Take Name as Input From User And Say Hello To him? Code : name = input ( "Enter Your Name :" ) print ( "Hello" , name ) Output : Download Source Code

Write A Programme In Python To Take Name as Input From User And Print There Name?

Image
 Write A Programme In Python To  Take Name as Input From User And Print There Name?   Code :  name = input ( "Enter Your Name :" ) print ( name ) Output : Download Source Code

How To Assign Multiple Variables in The One Line/Same Line in Python Programming Language

Image
 How To Assign Multiple Variables in the Same Line in Python : Code : a , b , c = True , 25 , "String" print ( a ) print ( b ) print ( c ) Output : Download Source Code

Write A Programme In Python To Print Your Name.

Image
 Write A Programme  In Python To Print Your Name : Code : print ( "Your Name" ) Download The Source Code

How To install Python Interpreter In Windows 7 , Windows 8, And Windows 10&11 Easily In 2022 .

Image
 How To install Python Interpreter In Windows 7, Windows 8, And Windows 10&11 Easily. 1. Open Your Favorite Browser And Search Download Python . 2. Open the First Link  https://www.python.org/downloads/   3. Click On  Download  To Start The Download. Then After Successfully downloading it. It's Time To Install it.  For Windows 7 Users Download Older Version Of  Python Interpreter : 1. Click View Full List Of   Download . 2. Download Any One Older Version Of Them. Then Start The Install Process. Install Process Of Python Interpreter : 1. Run The Programme As an Administrator  Then Click On Yes . 2. Check The Mark Add Python 3.10 to PATH 3. Then Click On Install Now button After It's Automatically Install Successfully. 4. After Successfully Install Python Interpreter Open Pop-Up Like It. Then You Simple Click On the Close Button.