Python Programs

Enter the number to print month in Python

View All Python Programs Source Code num=int(input(“Enter the number from 1 to 12 : “)) if num==1:     print(“January”) elif num==2:     print(“Feburary”) elif num==3:     print(“March”) elif num==4:     print(“April”) elif num==5:     print(“May”) elif num==6:     print(“June”) elif num==7:     print(“July”) elif num==8:     print(“August”) elif num==9:     print(“September”) elif num==10:     print(“October”) […]

Enter the number to print month in Python Read More »

Find out the grade by entering the percentage in Python

View All Python Programs Source Code per=int(input(“Enter your percentage : “)) if per>=90:     print(“Grade : A+”) elif per>=80:     print(“Grade : A”) elif per>=70:     print(“Grade : B”) elif per>=60:     print(“Grade : C”) elif per>=50:     print(“Grade : D”) elif per>=40:     print(“Grade : E”) else:     print(“Fail”) Output Enter your percentage :

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

Find the area & perimeter of circle with user-interface in Python

View All Python Programs Source Code r=float(input(“Enter radius : “))pi=3.14area=pi*r*rperi=2*pi*rprint(“Area of circle : “, area)print(“Perimeter of circle : “, peri) Output Enter radius : 8.7Area of circle : 237.66659999999996 Perimeter of circle : 54.635999999999996 View All Python Programs

Find the area & perimeter of circle with user-interface in Python Read More »

Find the area & perimeter of rectangle with user-interface in Python

View All Python Programs Source Code l=int(input(“Enter length : “))w=int(input(“Enter width : “))area=l*wperi=2*(l+w)print(“Area of rectangle : “, area)print(“Perimeter of rectangle : “, peri) Output Enter length : 78Enter width : 54Area of rectangle : 4212Perimeter of rectangle : 264 View All Python Programs

Find the area & perimeter of rectangle with user-interface in Python Read More »

Calculate the percentage 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 : “))print(“Hindi Marks : “, hin)print(“English Marks : “, eng)print(“Maths Marks : “, mth)print(“Science Marks : “, sci)print(“Computer Marks : “, com)per=(hin+eng+mth+sci+com)/5print(“Percentage : “, per) Output Enter hindi marks :

Calculate the percentage of given marks in Python Read More »