Posts

Program

 1 Write a Python program to make user choice to print area of different figure def Square():     number=int(input("Enter the side:"))     area=number*number     print("Area of Square:",area) def Rectangle():     l=int(input("Enter the Length: "))     b=int(input("Enter the Breadth: "))     area=l*b     print("Area of Rectangle:" ,area) def Triangle():     b=int(input("enter the base of triangle:"))     h=int(input("enter the height of the triangle:"))     area=b*h*.5     print("Area of triangle :",area) print("Enter the choice 1 for Rectangle 2 for square and 3 for Triangle") n=int(input("enter the choice:")) if n==1:     Rectangle() elif n==2:     Square() else:     Triangle() 2 Write a Python program to read a text file and display the number of vowels/consonants/uppercase/lowercase characters in the file file=open("AI.TXT","r") content=file.read() vowels=0 consona