Python Programs

Find the greatest number between 3 number in Python

View All Python Programs Source Code (Method-1) n1=int(input(“Input 1 number : “)) n2=int(input(“Input 2 number : “)) n3=int(input(“Input 3 number : “)) if n3>n1:     if n3>n2:         print(“N3 is greatest”) elif n2>n1:     if n2>n3:         print(“N2 is greatest”) elif n1>n2:     if n1>n3:         print(“N1 is greatest”) Output Input 1 number : 4Input […]

Find the greatest number between 3 number in Python Read More »

Enter the number to print rainbow color in Python

View All Python Programs Source Code num=int(input(“Enter the number from 1 to 7 : “)) if num==1:     print(“Violet”) elif num==2:     print(“Indigo”) elif num==3:     print(“Blue”) elif num==4:     print(“Green”) elif num==5:     print(“Yellow”) elif num==6:     print(“Orange”) elif num==7:     print(“Red”) else:     print(“You enter number out of range”) Output Enter the number

Enter the number to print rainbow color in Python Read More »

Find out the division by entering the percentage in Python

View All Python Programs Source Code per=int(input(“Enter your percentage : “)) if per>=60:     print(“Division : First”) elif per>=50:     print(“Division : Second”) elif per>=40:     print(“Division : Third”) else:     print(“Fail”) Output Enter your percentage : 45Division : Third View All Python Programs

Find out the division by entering the percentage in Python Read More »

Create login interface by id and password in Python

View All Python Programs Source Code (Method-1) id=input(“Enter your Id: “) pas=int(input(“Enter your password : “)) if id==”brcinstitute”:     if pas==123:         print(“Login Success”)     else:         print(“Password is wrong”) else:     print(“Id is wrong”) Output  Enter your Id: brcinstituteEnter your password : 78Password is wrong Source Code (Method-2) id=input(“Enter your Id: “) pas=int(input(“Enter your

Create login interface by id and password in Python Read More »

Calculate fail or pass of given marks in Python

View All Python Programs Source Code hin=int(input(“Enter hindi marks : “)) eng=int(input(“Enter english marks : “)) mth=int(input(“Enter maths marks : “)) sci=int(input(“Enter science marks : “)) com=int(input(“Enter computer marks : “)) per=(hin+eng+mth+sci+com)/5 print(“Percentage : “, per) if per>40:     print(“Result : Pass”) else:     print(“Result : Fail”) Output Enter hindi marks : 78 Enter english

Calculate fail or pass of given marks in Python Read More »

Enter the number to print week day in Python

View All Python Programs Source Code num=int(input(“Enter the number from 1 to 7 : “)) if num==1:     print(“Monday”) elif num==2:     print(“tuesday”) elif num==3:     print(“Wednesday”) elif num==4:     print(“Thursday”) elif num==5:     print(“Friday”) elif num==6:     print(“Saturday”) elif num==7:     print(“Sunday”) else:     print(“You enter number out of range”) Output Enter the number

Enter the number to print week day in Python Read More »