Python Programs

Right Pascal Triangle Patterns in python

View All Python Programs Right Pascal Triangle Pattern (Source Code) for x in range(1,5):     if x%2==0:         for y in range(1,x):             print(“*”,end=” “)     else:         for z in range(1,x):             print(” “,end=”*”)        print(“”) for x in range(1,5):     if x%2==0:         for y in range(5,x,-1):             print(“*”,end=” “)     else:        

Right Pascal Triangle Patterns in python Read More »

Inverted Right triangle patterns in python

View All Python Programs Inverted Right Triangle Pattern Type-1 (Source Code) for x in range(1,6):     for y in range(1,x):         print(” “,end=””)     for y in range(6,x,-1):         print(“*”,end=””)     print(“”) Output *****   ****     ***       **         * Inverted Right Triangle Pattern Type-2 (Source Code) for x in range(1,6):     for

Inverted Right triangle patterns in python Read More »

Calculate the Discount & Grand Total in shopping bill by the given criteria in python

View All Python Programs Calculate the Discount & Grand Total in shopping bill by the given criteria Rs.1 to Rs.1000 – 0% Discount Rs.1001 to Rs.3000 – 10% Discount Rs.3001 to Rs.5000 – 20% Discount More than Rs. 5000 – 30% Discount qt=int(input(“Enter the quantity : “))rt=int(input(“Enter the rate : “))tot=qt*rt    dis=0if tot>=1 and

Calculate the Discount & Grand Total in shopping bill by the given criteria in python Read More »

Right triangle patterns in python

View All Python Programs Right Trianlge Type -1 (Source Code) for x in range(1,7):     for y in range(7,x,-1):         print(“”,end=” “)     for y in range(1,x):         print(“*”,end=””)     print(“”) Output       *     **    ***  **** ***** Right Trianlge Type -2 (Source Code) for x in range(1,7):     for y in

Right triangle patterns in python Read More »

Left triangle patterns in python

View All Python Programs Left Trianlge Type -1 (Source Code) for x in range(1,7):     for y in range(1,x):         print(“*”,end=””)     print(“”) Output *************** Left Trianlge Type -2 (Source Code) for x in range(1,7):    for y in range(1,x):        print(y,end=””)    print(“”) Output 112123123412345 Left Trianlge

Left triangle patterns in python Read More »

Check college admission eligibility by 12 percentage and entrance exam marks

View All Python Programs Check college admission eligibility by 12 percentage and entrance exam marks Condition:- 12 percentage must be greater than 80 Entrance marks must be greater than 70 Source Code per=int(input(“Enter 12 percentage : “)) mrk=int(input(“Enter entrance exam marks : “)) if per>80:     if mrk>70:         print(“You are eligible for admission”)    

Check college admission eligibility by 12 percentage and entrance exam marks Read More »

Calculate the electricity bill by entering unit in Python

View All Python Programs Calculate the electricity bill by entering unit Per unit calculation charges on the following condition (1-100) Unit -Rs. 3 (101-500) Unit -Rs. 5 (501-1000) Unit -Rs. 8 (Greater than 1000) Unit -Rs. 10 Source Code u=int(input(“Enter unit :”)) if u>=1 and u<100:     pu=3 elif u>=100 and u<500:     pu=5 elif

Calculate the electricity bill by entering unit in Python Read More »